Skip to the content.

The goal of this Java project is to relabel a conflict scenario which was labelled as Concatenation in the database into ConcatenationV1V2 or ConcatenationV2V1. It uses the following information: V1, V2, context, and resolution content. This program is used during the relabelling of the conflicts database.

The labelling algorithm was extracted from https://github.com/gems-uff/merge-nature.

How to build

Simply execute the maven goal.

$ mvn install

The executable jar file will be created in the target folder with the name classifyConcatenation.jar.

How to execute

To label a merge scenario, use the following command.

$ java -jar classifyConcatenation.jar v1 v2 context1 context2 solution

Where v1,v2, context1, context2, and solution are paths to files containing the respective text for each one.

The result will be printed to the standard output (stdout).


Consider the following conflict scenario as an example:

Scenario:

    private BranchDao branchDao;
    private NotificationService notificationService;
    private SubscriptionService subscriptionService;
<<<<<<< HEAD
    private PaginationService paginationService;
=======
    private UserService userService;
>>>>>>> 29a02308ca5557b393a44605cc9cba752a88acc7

    /**
     * Create an instance of User entity based service

In this example, the following files and its contents will be considered.

v1:

    private PaginationService paginationService;

v2:

    private UserService userService;

context1:

    private BranchDao branchDao;
    private NotificationService notificationService;
    private SubscriptionService subscriptionService;

context2:


    /**
     * Create an instance of User entity based service

solution:

    private BranchDao branchDao;
    private NotificationService notificationService;
    private SubscriptionService subscriptionService;
    private PaginationService paginationService;
    private UserService userService;

    /**
     * Create an instance of User entity based service

If these files are provided to the executable jar, it will be classified as ConcatenationV1V2.