diff --git a/src/main/java/org/refactoringminer/astDiff/matchers/wrappers/RefactoringMatcher.java b/src/main/java/org/refactoringminer/astDiff/matchers/wrappers/RefactoringMatcher.java index 0eead4b47..ae09eec70 100644 --- a/src/main/java/org/refactoringminer/astDiff/matchers/wrappers/RefactoringMatcher.java +++ b/src/main/java/org/refactoringminer/astDiff/matchers/wrappers/RefactoringMatcher.java @@ -167,6 +167,7 @@ private void processRefactorings(Tree srcTree, Tree dstTree, List r if (dstVariableDeclaration != null) { List dstChildrenList = dstVariableDeclaration.getChildren(); + if (dstChildrenList.isEmpty()) continue; //Might need to investigate what would be the better diff in these cases Tree dstVarName = dstChildrenList.get(dstChildrenList.size() - 1); for (VariableDeclaration variableDeclaration : mergedVariables) { Tree srcVariableDeclaration = TreeUtilFunctions.findByLocationInfo(srcTree, variableDeclaration.getLocationInfo());