Skip to content

Variability-aware patching of software product-line variants#179

Open
piameier wants to merge 164 commits intoVariantSync:thesis_pmfrom
piameier:prototyping
Open

Variability-aware patching of software product-line variants#179
piameier wants to merge 164 commits intoVariantSync:thesis_pmfrom
piameier:prototyping

Conversation

@piameier
Copy link
Contributor

@piameier piameier commented Feb 3, 2026

This is the code used for the practical part of my master's thesis. We contribute a patching algorithm and an experiment evaluating this patcher and comparing it against gnu patch and mpatch.

src/main/java/org/variantsync/diffdetective/util/StringUtils.java : I do not know if the change of the line break affects code somewhere else, but I needed the change for diffing the unparsed trees with gnu diff.

src/main/java/org/variantsync/diffdetective/variation/diff/transform/EliminateEmptyAlternatives.java : my IDE shows problems with the .getFirst() method so I replaced it with .get(0).

Copy link
Member

@pmbittner pmbittner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Pia,

Thank you very much for the pull-request! I will redirect your PR to a new branch and then do some code cleanup there instead of forcing this work onto you now. I still have some comments and questions though where I could need your help. :)

public LinkedHashSet<String> computeAllFeatureNames() {
LinkedHashSet<String> features = new LinkedHashSet<>();
public LinkedHashSet<Object> computeAllFeatureNames() {
LinkedHashSet<Object> features = new LinkedHashSet<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was it necessary to turn these strings into objects, only to recover that lost information by casting a few lines later?

@@ -0,0 +1,629 @@
package org.variantsync.diffdetective.variation.diff.patching;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this class for? It looks like a bag of utilities. Are these utilities useful only for your experiments or for DiffDetective in general?

It would be good to move utlities that belong to only your experiment into that package, and put the other utilities into the correct places within DiffDetective, and to document them.

public class StringUtils {
/** An operating system independent line break used in almost all internal strings. */
public final static String LINEBREAK = "\r\n";
public final static String LINEBREAK = "\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this change is sensible. I do not remember why we chose CRLF here in the first place.


/**
* Relevance predicate that generates (partial) variants from variation trees.
* This relevance predicate is the implementation of Equation 5 in our SPLC'23 paper.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this documentation up to date? To which predicate in your master's thesis does this belong?

import org.variantsync.functjonal.Pair;
import org.variantsync.functjonal.Result;

public class Generator {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this generator generate? Could you add some documentation? You can also answer to this comment and I add the JavaDoc documentation later on.

final private static String patch = "patch.txt";

enum Error {
FAILED, ERROR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between these?

@pmbittner pmbittner changed the base branch from develop to thesis_pm February 5, 2026 16:20
@pmbittner pmbittner added enhancement New feature or request Refactoring labels Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants