Skip to content

Commit 8406ba3

Browse files
committed
feat: gumtree simple is now the default matcher.
1 parent 8ffbeec commit 8406ba3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

core/src/main/java/com/github/gumtreediff/matchers/CompositeMatchers.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
package com.github.gumtreediff.matchers;
2222

2323
import java.util.Arrays;
24+
import java.util.HashSet;
2425
import java.util.List;
2526
import java.util.Set;
2627

@@ -39,7 +40,6 @@
3940
import com.github.gumtreediff.matchers.optimizations.LeafMoveMatcherThetaE;
4041
import com.github.gumtreediff.matchers.optimizations.UnmappedLeavesMatcherThetaC;
4142
import com.github.gumtreediff.tree.Tree;
42-
import com.google.common.collect.Sets;
4343

4444
/**
4545
* A class defining the CompositeMatcher class, which is a pipeline of matchers.
@@ -73,28 +73,28 @@ public List<Matcher> matchers() {
7373

7474
@Override
7575
public Set<ConfigurationOptions> getApplicableOptions() {
76-
Set<ConfigurationOptions> allOptions = Sets.newHashSet();
76+
Set<ConfigurationOptions> allOptions = new HashSet<>();
7777
for (Matcher matcher : matchers)
7878
allOptions.addAll(matcher.getApplicableOptions());
7979

8080
return allOptions;
8181
}
8282
}
8383

84-
@Register(id = "gumtree", priority = Registry.Priority.MAXIMUM)
85-
public static class ClassicGumtree extends CompositeMatcher {
86-
public ClassicGumtree() {
87-
super(new GreedySubtreeMatcher(), new GreedyBottomUpMatcher());
88-
}
89-
}
90-
9184
@Register(id = "gumtree-simple", priority = Registry.Priority.HIGH)
9285
public static class SimpleGumtree extends CompositeMatcher {
9386
public SimpleGumtree() {
9487
super(new GreedySubtreeMatcher(), new SimpleBottomUpMatcher());
9588
}
9689
}
9790

91+
@Register(id = "gumtree-classic", priority = Registry.Priority.HIGH)
92+
public static class ClassicGumtree extends CompositeMatcher {
93+
public ClassicGumtree() {
94+
super(new GreedySubtreeMatcher(), new GreedyBottomUpMatcher());
95+
}
96+
}
97+
9898
@Register(id = "gumtree-simple-stable", priority = Registry.Priority.HIGH)
9999
public static class SimpleGumtreeStable extends CompositeMatcher {
100100
public SimpleGumtreeStable() {

0 commit comments

Comments
 (0)