Ignore INS actions.
This commit is contained in:
@@ -60,24 +60,25 @@ public class Parser {
|
|||||||
String actionStr = actionSet.getActionString();
|
String actionStr = actionSet.getActionString();
|
||||||
String astNodeType = actionSet.getAstNodeType();
|
String astNodeType = actionSet.getAstNodeType();
|
||||||
if (actionStr.startsWith("INS")) {
|
if (actionStr.startsWith("INS")) {
|
||||||
startPosition2 = actionSet.getStartPosition();
|
continue;
|
||||||
endPosition2 = startPosition2 + actionSet.getLength();
|
// startPosition2 = actionSet.getStartPosition();
|
||||||
|
// endPosition2 = startPosition2 + actionSet.getLength();
|
||||||
if ("EnhancedForStatement".equals(astNodeType) || "ForStatement".equals(astNodeType)
|
//
|
||||||
|| "DoStatement".equals(astNodeType) || "WhileStatement".equals(astNodeType)
|
// if ("EnhancedForStatement".equals(astNodeType) || "ForStatement".equals(astNodeType)
|
||||||
|| "LabeledStatement".equals(astNodeType) || "SynchronizedStatement".equals(astNodeType)
|
// || "DoStatement".equals(astNodeType) || "WhileStatement".equals(astNodeType)
|
||||||
|| "IfStatement".equals(astNodeType) || "TryStatement".equals(astNodeType)) {
|
// || "LabeledStatement".equals(astNodeType) || "SynchronizedStatement".equals(astNodeType)
|
||||||
List<Move> firstAndLastMov = getFirstAndLastMoveAction(actionSet);
|
// || "IfStatement".equals(astNodeType) || "TryStatement".equals(astNodeType)) {
|
||||||
if (firstAndLastMov != null) {
|
// List<Move> firstAndLastMov = getFirstAndLastMoveAction(actionSet);
|
||||||
startPosition = firstAndLastMov.get(0).getNode().getPos();
|
// if (firstAndLastMov != null) {
|
||||||
ITree lastTree = firstAndLastMov.get(1).getNode();
|
// startPosition = firstAndLastMov.get(0).getNode().getPos();
|
||||||
endPosition = lastTree.getPos() + lastTree.getLength();
|
// ITree lastTree = firstAndLastMov.get(1).getNode();
|
||||||
} else { // Pure insert actions without any move actions.
|
// endPosition = lastTree.getPos() + lastTree.getLength();
|
||||||
continue;
|
// } else { // Pure insert actions without any move actions.
|
||||||
}
|
// continue;
|
||||||
} else { // other insert statements
|
// }
|
||||||
continue;
|
// } else { // other insert statements
|
||||||
}
|
// continue;
|
||||||
|
// }
|
||||||
} else if (actionStr.startsWith("UPD")) {
|
} else if (actionStr.startsWith("UPD")) {
|
||||||
startPosition = actionSet.getStartPosition();
|
startPosition = actionSet.getStartPosition();
|
||||||
endPosition = startPosition + actionSet.getLength();
|
endPosition = startPosition + actionSet.getLength();
|
||||||
|
|||||||
Reference in New Issue
Block a user