List<RefactoringCandidate> added,
List<RefactoringCandidate> deleted) {
List<RefactoringPair> refactorings =
RefactoringExtractor.extractRefactorings(added, deleted, refactoringHelper);
for (RefactoringPair pair : refactorings) {
StructureNode leftDrn = pair.getDeletedEntity().getDiffNode().getLeft();
StructureNode rightDrn = pair.getInsertedEntity().getDiffNode().getRight();
StructureEntityVersion structureEntityVersion;
if (fVersion != null) {
structureEntityVersion = refactoringHelper.createStructureEntityVersionWithID(rightDrn, fVersion);
} else {
structureEntityVersion = refactoringHelper.createStructureEntityVersion(rightDrn);
}
Node rightRoot = fRightASTHelper.createDeclarationTree(rightDrn);
// use the new qualified name for the method; otherwise TreeDifferencer detects a return type change
Node leftRoot = fLeftASTHelper.createDeclarationTree(leftDrn, rightRoot.getValue());
if (isRenaming(leftDrn, rightDrn, refactoringHelper)) {
if (fVersion != null) {
structureEntityVersion =
refactoringHelper.createStructureEntityVersionWithID(leftDrn, rightDrn.getFullyQualifiedName(), fVersion);
} else {
structureEntityVersion =
refactoringHelper.createStructureEntityVersion(leftDrn, rightDrn.getFullyQualifiedName());
}
Update upd =
new Update(
structureEntityVersion,
fLeftASTHelper.createSourceCodeEntity(leftDrn),