1- package de . hub . mse .variantsync .boosting ;
1+ package org .variantsync .boosting ;
22
33import java .io .File ;
44import java .io .FileInputStream ;
3535import org .logicng .transformations .dnf .DNFSubsumption ;
3636import org .tinylog .Logger ;
3737
38- import de . hub . mse . variantsync .boosting .ecco .ASTNode ;
39- import de . hub . mse . variantsync .boosting .ecco .Association ;
40- import de . hub . mse . variantsync .boosting .ecco .EccoSet ;
41- import de . hub . mse . variantsync .boosting .ecco .Feature ;
42- import de . hub . mse . variantsync .boosting .ecco .MainTree ;
43- import de . hub . mse . variantsync .boosting .ecco .Module ;
44- import de . hub . mse .variantsync .boosting .parsing .AbstractAST ;
45- import de . hub . mse .variantsync .boosting .parsing .CAST ;
46- import de . hub . mse .variantsync .boosting .parsing .ESupportedLanguages ;
47- import de . hub . mse .variantsync .boosting .parsing .JavaAST ;
48- import de . hub . mse .variantsync .boosting .parsing .LineAST ;
49- import de . hub . mse .variantsync .boosting .product .Product ;
50- import de . hub . mse .variantsync .boosting .product .ProductInitializationTask ;
51- import de . hub . mse .variantsync .boosting .product .ProductLoadTask ;
52- import de . hub . mse .variantsync .boosting .product .ProductLoader ;
53- import de . hub . mse .variantsync .boosting .product .ProductPassport ;
54- import de . hub . mse .variantsync .boosting .product .ProductSaveTask ;
38+ import org . variantsync .boosting .datastructure .ASTNode ;
39+ import org . variantsync .boosting .datastructure .Association ;
40+ import org . variantsync .boosting .datastructure .EccoSet ;
41+ import org . variantsync .boosting .datastructure .Feature ;
42+ import org . variantsync .boosting .datastructure .MainTree ;
43+ import org . variantsync .boosting .datastructure .Module ;
44+ import org .variantsync .boosting .parsing .AbstractAST ;
45+ import org .variantsync .boosting .parsing .CAST ;
46+ import org .variantsync .boosting .parsing .ESupportedLanguages ;
47+ import org .variantsync .boosting .parsing .JavaAST ;
48+ import org .variantsync .boosting .parsing .LineAST ;
49+ import org .variantsync .boosting .product .Product ;
50+ import org .variantsync .boosting .product .ProductInitializationTask ;
51+ import org .variantsync .boosting .product .ProductLoadTask ;
52+ import org .variantsync .boosting .product .ProductLoader ;
53+ import org .variantsync .boosting .product .ProductPassport ;
54+ import org .variantsync .boosting .product .ProductSaveTask ;
5555
5656/**
5757 * The {@code TraceBoosting} class encapsulates the algorithm for enhancing
58- * retroactive feature tracing with proactively collected feature traces.
58+ * retroactive comparison-based feature tracing with proactively collected feature traces.
5959 * It is designed to work with a set of product variants and their associated
6060 * feature traces to produce a more accurate and efficient tracing process.
61- * The algorithm is inspired by the ECCO tracing algorithm and is tailored to
62- * improve upon it by utilizing additional trace information.
61+ * The algorithm is inspired by the <a href="https://jku-isse.github.io/ecco/"> ECCO tracing algorithm</a>
62+ * and is tailored to improve it by utilizing additional trace information.
6363 *
6464 * <p>
6565 * Usage example:
6969 * // Initialize a list to hold ProductPassport objects that describe the
7070 * // artifact locations for each variant
7171 * List<ProductPassport> productPassports = new ArrayList<>();
72- * // Iterate over the collection of variants
72+ *
73+ * // Iterate the collection of variants
7374 * for (Variant variant : variants) {
7475 * String variantName = variant.getName();
7576 * // Create a new ProductPassport for the variant and add it to the list
7677 * productPassports.add(new ProductPassport(variantName,
7778 * variantsDirectory.resolve(variantName), configFileMap.get(variantName)));
7879 * }
80+ *
7981 * // Instantiate the TraceBoosting algorithm with the product passports,
8082 * // working directory, and the supported language for tracing.
8183 * // LINES creates a simple line-based AST that is language-agnostic.
8284 * TraceBoosting traceBoosting = new TraceBoosting(productPassports,
8385 * workingDirectory, ESupportedLanguages.LINES);
86+ *
8487 * // Retrieve the list of products from the TraceBoosting instance
8588 * List<Product> products = traceBoosting.getProducts();
89+ *
8690 * // Apply the proactively collected traces to the products
8791 * distributeMappings(products, variantGenerationResult.variantGroundTruthMap(),
8892 * percentage, config.getStrip());
89- * // Compute the Main tree which represents the merged variant AST with feature
90- * // traces
93+ *
94+ * // Compute the main tree which represents the AST resulting from merging all variants
95+ * // together with feature traces
9196 * MainTree mainTree = traceBoosting.compute();
9297 * }</pre>
9398 *
9499 * <p>
95100 * Note: The actual implementation of methods like {@code distributeMappings}
96- * and {@code computeEcco } are not shown in this example and should be defined
101+ * and {@code compute } are not shown in this example and should be defined
97102 * elsewhere in the codebase.
98103 * </p>
99104 */
@@ -116,7 +121,7 @@ public class TraceBoosting {
116121 /**
117122 * Returns the FormulaFactory instance that is currently in use.
118123 *
119- * @return the FormulaFactory instance that is is currently in use
124+ * @return the FormulaFactory instance that is currently in use
120125 */
121126 public static FormulaFactory getFormulaFactory () {
122127 return f ;
@@ -285,7 +290,7 @@ private static String getName(String suffix, final ASTNode astNode, boolean insi
285290 }
286291
287292 private static EccoSet <Module > featuresToModules (final EccoSet <Feature > positiveFeatures ,
288- final EccoSet <Feature > negativeFeatures ) {
293+ final EccoSet <Feature > negativeFeatures ) {
289294 final EccoSet <Module > result = new EccoSet <>();
290295 final EccoSet <EccoSet <Feature >> positivePowerSet = positiveFeatures .powerSet ();
291296 final EccoSet <EccoSet <Feature >> negativePowerSet = negativeFeatures .powerSet ();
0 commit comments