Skip to content

Commit

Permalink
detection of Move and Rename Method in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed May 18, 2024
1 parent 719e8e2 commit 2ae194c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/gr/uom/java/xmi/diff/UMLModelDiff.java
Original file line number Diff line number Diff line change
Expand Up @@ -4684,7 +4684,10 @@ private boolean movedAndRenamedMethodSignature(UMLOperation removedOperation, UM
}
}
double normalizedEditDistance = mapper.normalizedEditDistance();
if(exactLeafMappings == 0 && normalizedEditDistance > 0.24) {
boolean zeroNonMapped = mapper.getNonMappedLeavesT1().size() == 0 && mapper.getNonMappedLeavesT2().size() == 0 &&
mapper.getNonMappedInnerNodesT1().size() == 0 && mapper.getNonMappedInnerNodesT2().size() == 0 &&
removedOperation.hasTestAnnotation() && addedOperation.hasTestAnnotation();
if(exactLeafMappings == 0 && !zeroNonMapped && normalizedEditDistance > 0.24) {
return false;
}
if(exactLeafMappings == 1 && normalizedEditDistance > 0.51 && (mapper.nonMappedElementsT1() > 0 || mapper.nonMappedElementsT2() > 0)) {
Expand Down

0 comments on commit 2ae194c

Please sign in to comment.