Skip to content

Commit 5ff9674

Browse files
committed
remove obsolete code and add some comments
1 parent 0210480 commit 5ff9674

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

src/main/java/Demo.java

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,21 @@ public static void main(String[] args) {
2929
System.out.println("initiated with " + variants.size() + " products");
3030
applyDistribution(variants);
3131

32+
//collect and print set of extracted features (from configurations)
33+
Set<String> relevantFeatures = variants.stream().flatMap(p -> p.getFeatures().stream().map(Feature::getName))
34+
.collect(Collectors.toSet());
35+
System.out.println(relevantFeatures);
36+
3237
// runs the boosted comparison-based feature tracoing algorithm
3338
MainTree tree = traceBoosting.computeMappings();
3439

40+
// verify the results by checking which feature expressions are mapped onto the nodes of the variants
3541
for (ASTNode n : tree.getTree().getAstNodes()) {
3642
if (!n.getMapping().toString().equals("$true")) {
3743
System.out.println(n.getMapping()+ " mapped onto " + n.getCode());
3844
}
3945
}
4046

41-
Set<String> relevantFeatures = variants.stream().flatMap(p -> p.getFeatures().stream().map(Feature::getName))
42-
.collect(Collectors.toSet());
43-
44-
System.out.println(relevantFeatures);
45-
46-
// for (Variant p : traceBoosting.getVariants())
47-
// {
48-
// System.out.println("Variant: " + p.getName());
49-
// for (ASTNode as : p.getAstNodesMainTree()) {
50-
// if (!as.getMapping().toString().equals("$true")) {
51-
// System.out.println( as.getMapping()+ " mapped onto " + as.getCode());
52-
// }
53-
// }
54-
// System.out.println();
55-
// }
5647
}
5748

5849
private static List<VariantPassport> createVariantPassports() {

0 commit comments

Comments
 (0)