Skip to content

Commit

Permalink
Eliminate Move Method false positives in commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Jan 8, 2025
1 parent 12baf5d commit f0ea722
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/gr/uom/java/xmi/diff/UMLClassBaseDiff.java
Original file line number Diff line number Diff line change
Expand Up @@ -2046,7 +2046,8 @@ private void updateMapperSet(TreeSet<UMLOperationBodyMapper> mapperSet, UMLOpera
UMLOperationBodyMapper operationBodyMapper = new UMLOperationBodyMapper(removedOperation, addedOperation, this);
List<AbstractCodeMapping> totalMappings = new ArrayList<AbstractCodeMapping>(operationBodyMapper.getMappings());
int mappings = operationBodyMapper.mappingsWithoutBlocks();
if(mappings > 0 || (delegatesToAnotherRemovedOperation(removedOperation) && addedOperation.getBody() != null && addedOperation.stringRepresentation().size() > 3) || (removedOperation.getName().equals(addedOperation.getName()) && removedOperation.getBody() != null && addedOperation.getBody() != null)) {
if(mappings > 0 || (delegatesToAnotherRemovedOperation(removedOperation) && addedOperation.getBody() != null && addedOperation.stringRepresentation().size() > 3) || (removedOperation.getName().equals(addedOperation.getName()) && removedOperation.getBody() != null && addedOperation.getBody() != null) ||
removedOperation.equalSignatureForAbstractMethods(addedOperation)) {
boolean zeroNonMapped = operationBodyMapper.getNonMappedLeavesT1().size() == 0 && operationBodyMapper.getNonMappedLeavesT2().size() == 0 &&
operationBodyMapper.getNonMappedInnerNodesT1().size() == 0 && operationBodyMapper.getNonMappedInnerNodesT2().size() == 0 &&
removedOperation.hasTestAnnotation() && addedOperation.hasTestAnnotation();
Expand Down

0 comments on commit f0ea722

Please sign in to comment.