Update.
This commit is contained in:
@@ -364,6 +364,10 @@ public abstract class Parser implements ParserInterface {
|
||||
singleEdit.endsWith("New") || singleEdit.endsWith("WildcardType") || singleEdit.endsWith("SimpleType") ||
|
||||
singleEdit.endsWith("QualifiedType") || singleEdit.endsWith("PrimitiveType") || singleEdit.endsWith("NameQualifiedType")) {
|
||||
singleEdit += " " + actionSet.getNode().getLabel();
|
||||
} else if (singleEdit.endsWith("SuperConstructorInvocation")) {
|
||||
singleEdit += " super";
|
||||
} else if (singleEdit.endsWith("ConstructorInvocation")) {
|
||||
singleEdit += " this";
|
||||
} else if (singleEdit.endsWith("SimpleName")) {
|
||||
actionStr = actionStr.substring(index + 2);
|
||||
if (actionStr.startsWith("MethodName")) {
|
||||
|
||||
@@ -391,6 +391,8 @@ public class HunkActionFilter {
|
||||
int bugHunkEndLine = violation.getBugEndLineNum();
|
||||
int fixHunkStartLine = violation.getFixStartLineNum();
|
||||
int fixHunkEndLine = violation.getFixEndLineNum();
|
||||
int bugFixStartLineNum = violation.getBugFixStartLineNum();
|
||||
int bugFixEndLineNum = violation.getBugFixEndLineNum();
|
||||
|
||||
for (HierarchicalActionSet actionSet : actionSets) {
|
||||
int actionBugStartLine = actionSet.getBugStartLineNum();
|
||||
@@ -412,7 +414,8 @@ public class HunkActionFilter {
|
||||
}
|
||||
|
||||
// INS with MOV actions that are not identified in previous IF predicate, and pure INS actions
|
||||
if (violation.getBugFixStartLineNum() >= actionFixEndLine && actionFixStartLine <= violation.getBugFixEndLineNum()) {
|
||||
if (bugFixStartLineNum >= actionFixEndLine && actionFixStartLine <= bugFixEndLineNum && Math.abs(bugFixStartLineNum - actionFixStartLine) <= 3
|
||||
&& Math.abs(bugFixEndLineNum - actionFixEndLine) <= 3) {
|
||||
violation.getActionSets().add(actionSet);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user