Skip to content

Commit

Permalink
ASTDiff: Fix the editscript generation for extra diff
Browse files Browse the repository at this point in the history
  • Loading branch information
pouryafard75 authored and tsantalis committed May 29, 2024
1 parent 3033085 commit c09832f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.refactoringminer.api.Refactoring;
import org.refactoringminer.api.RefactoringMinerTimedOutException;
import org.refactoringminer.api.RefactoringType;
import org.refactoringminer.astDiff.actions.editscript.SimplifiedExtendedChawatheScriptGenerator;
import org.refactoringminer.astDiff.models.ExtendedMultiMappingStore;
import org.refactoringminer.astDiff.models.OptimizationData;
import org.refactoringminer.astDiff.moved.AllSubTreesMovedASTDiffGenerator;
Expand Down Expand Up @@ -145,9 +146,12 @@ else if(modelDiffRefactoring.getRefactoringType() == RefactoringType.MOVE_AND_RE
if (append != null)
append.getAllMappings().mergeMappings(mappingStore);
else {
mappingStore.addMapping(treeContextPair.first.getRoot(), treeContextPair.second.getRoot());
ASTDiff diff = new ASTDiff(srcPath, dstPath,
treeContextPair.first, treeContextPair.second,
mappingStore);
mappingStore,
new SimplifiedExtendedChawatheScriptGenerator().computeActions(mappingStore));
mappingStore.removeMapping(treeContextPair.first.getRoot(), treeContextPair.second.getRoot());
projectASTDiff.addMoveASTDiff(diff);
}
}
Expand Down

0 comments on commit c09832f

Please sign in to comment.