Remove BreakStatements.
This commit is contained in:
@@ -122,19 +122,19 @@ public class HierarchicalRegrouper {
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
if (!(action instanceof Addition) && !(act instanceof Addition)) {
|
||||
// || (action instanceof Insert && (act instanceof Insert))) {
|
||||
int startPosition = act.getPosition();
|
||||
int length = act.getLength();
|
||||
int startP = action.getPosition();
|
||||
int leng = action.getLength();
|
||||
|
||||
if (startP > startPosition + length) {
|
||||
break;
|
||||
} else if (startP + leng < startPosition) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// if (!(action instanceof Addition) && !(act instanceof Addition)) {
|
||||
//// || (action instanceof Insert && (act instanceof Insert))) {
|
||||
// int startPosition = act.getPosition();
|
||||
// int length = act.getLength();
|
||||
// int startP = action.getPosition();
|
||||
// int leng = action.getLength();
|
||||
//
|
||||
// if (startP > startPosition + length) {
|
||||
// break;
|
||||
// } else if (startP + leng < startPosition) {
|
||||
// continue;
|
||||
// }
|
||||
// }
|
||||
// SubAction range: startP <= startPosition && startPosition + length <= startP + leng
|
||||
addToActionSets(actionSet, parentAct, actSet.getSubActions());
|
||||
}
|
||||
@@ -156,19 +156,19 @@ public class HierarchicalRegrouper {
|
||||
actionSet.getSubActions().add(actSet);
|
||||
return true;
|
||||
} else {
|
||||
if (!(action instanceof Addition) && !(act instanceof Addition)) {
|
||||
// || (action instanceof Insert && (act instanceof Insert))) {
|
||||
int startPosition = act.getPosition();
|
||||
int length = act.getLength();
|
||||
int startP = action.getPosition();
|
||||
int leng = action.getLength();
|
||||
|
||||
if (startP > startPosition + length) {
|
||||
break;
|
||||
} else if (startP + leng < startPosition) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// if (!(action instanceof Addition) && !(act instanceof Addition)) {
|
||||
//// || (action instanceof Insert && (act instanceof Insert))) {
|
||||
// int startPosition = act.getPosition();
|
||||
// int length = act.getLength();
|
||||
// int startP = action.getPosition();
|
||||
// int leng = action.getLength();
|
||||
//
|
||||
// if (startP > startPosition + length) {
|
||||
// break;
|
||||
// } else if (startP + leng < startPosition) {
|
||||
// continue;
|
||||
// }
|
||||
// }
|
||||
// SubAction range: startP <= startPosition && startPosition + length <= startP + leng
|
||||
List<HierarchicalActionSet> subActionSets = actionSet.getSubActions();
|
||||
if (subActionSets.size() > 0) {
|
||||
|
||||
@@ -329,9 +329,9 @@ public class HunkActionFilter {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (bugEndLine < actionBugStartLine) {
|
||||
break;
|
||||
}
|
||||
// if (bugEndLine < actionBugStartLine) {
|
||||
// break;
|
||||
// }
|
||||
if (bugStartLine <= actionBugStartLine && actionBugEndLine <= bugEndLine) {
|
||||
if (startLine <= actionBugEndLine && endLine >= actionBugStartLine) {
|
||||
violation.getActionSets().add(actionSet);
|
||||
@@ -402,9 +402,9 @@ public class HunkActionFilter {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (bugHunkEndLine < actionBugStartLine) {
|
||||
break;
|
||||
}
|
||||
// if (bugHunkEndLine < actionBugStartLine) {
|
||||
// break;
|
||||
// }
|
||||
if (bugHunkStartLine <= actionBugStartLine && actionBugEndLine <= bugHunkEndLine) {
|
||||
if (violationStartLine <= actionBugEndLine && violationEndLine >= actionBugStartLine) {
|
||||
violation.getActionSets().add(actionSet);
|
||||
@@ -570,9 +570,9 @@ public class HunkActionFilter {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (endLine < actionBugStartLine) {
|
||||
break;
|
||||
}
|
||||
// if (endLine < actionBugStartLine) {
|
||||
// break;
|
||||
// }
|
||||
if (startLine <= actionBugStartLine && actionBugEndLine <= endLine) {
|
||||
if (startLine <= actionBugEndLine && endLine >= actionBugStartLine) {
|
||||
violation.getActionSets().add(actionSet);
|
||||
|
||||
Reference in New Issue
Block a user