Skip to content

Commit 7747118

Browse files
committed
fix: size ordering of ambigous mappings not correct, fix ##380.
1 parent f01d479 commit 7747118

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/com/github/gumtreediff/matchers/heuristic/gt/GreedySubtreeMatcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static class AmbiguousMappingsComparator implements Comparator<Pair<Set<T
5656
@Override
5757
public int compare(Pair<Set<Tree>, Set<Tree>> m1, Pair<Set<Tree>, Set<Tree>> m2) {
5858
int s1 = m1.first.stream().max(Comparator.comparingInt(t -> t.getMetrics().size)).get().getMetrics().size;
59-
int s2 = m1.first.stream().max(Comparator.comparingInt(t -> t.getMetrics().size)).get().getMetrics().size;
59+
int s2 = m2.first.stream().max(Comparator.comparingInt(t -> t.getMetrics().size)).get().getMetrics().size;
6060
return Integer.compare(s2, s1);
6161
}
6262
}

0 commit comments

Comments
 (0)