Skip to content

Commit

Permalink
Improve UMLModelDiff.matches()
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Jan 2, 2025
1 parent 0ad32fe commit 27d3ef8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 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 @@ -1359,9 +1359,15 @@ private static String matches(String s, Set<String> classNames, AbstractCodeFrag
matches.add(className);
}
}
AbstractCall invocationCoveringEntireStatement = fragment.invocationCoveringEntireFragment();
for(AbstractCall call : fragment.getMethodInvocations()) {
if(call.actualString().equals(s) && s.contains(className)) {
matches.add(className);
boolean skip = false;
if(invocationCoveringEntireStatement != null && invocationCoveringEntireStatement.actualString().equals(call.actualString())) {
skip = true;
}
if(!skip)
matches.add(className);
}
}
}
Expand Down

0 comments on commit 27d3ef8

Please sign in to comment.