Detecting semantic conflicts with unit tests
Artikel i vetenskaplig tidskrift, 2024

While modern merge techniques, such as 3-way and structured merge, can resolve textual conflicts automatically, they fail when the conflict arises not at the syntactic, but at the semantic level. Detecting such semantic conflicts requires understanding the behavior of the software, which is beyond the capabilities of most existing merge tools. Although semantic merge tools have been proposed, they are usually based on heavyweight static analyses, or need explicit specifications of program behavior. In this work, we take a different route and propose SAM (SemAntic Merge), a semantic merge tool based on the automated generation of unit tests that are used as partial specifications of the changes to be merged, and that drive the detection of unwanted behavior changes (conflicts) when merging software. To evaluate SAM's feasibility for detecting conflicts, we perform an empirical study relying on a dataset of more than 80 pairs of changes integrated to common class elements (constructors, methods, and fields) from 51 merge scenarios. We also assess how the four unit test generation tools used by SAM individually contribute to conflict identification. Our results show that SAM performs best when combining only the tests generated by Differential EvoSuite and EvoSuite, and using our proposed testability transformations (nine detected conflicts out of 29). These results reinforce previous findings about the potential of using test-case generation to detect conflicts as a method that is versatile and requires only limited deployment effort in practice.

Behavior change

Differential testing

Semantic conflicts

Författare

[Person c96b7478-c44a-43c4-bf85-d395c49e4a20 not found]

[Person 1f6bd87d-a2d8-4a84-89ef-fec8e19c098d not found]

[Person 18ad1fe9-0328-4baa-973a-bd30b4e34101 not found]

[Person 13a50ec9-13f8-41df-88ee-0ce062a0249a not found]

[Person 678d51eb-55f4-419c-8356-6300612426a4 not found]

[Person d8aa3b75-ce64-451f-9a50-65019ac885c7 not found]

[Person 84089094-1a5f-4bf5-be16-43770aa10ee0 not found]

[Person a7533566-0bfb-4806-95c6-15cd135413b5 not found]

Journal of Systems and Software

0164-1212 (ISSN)

Vol. 214 112070

Ämneskategorier (SSIF 2011)

Datavetenskap (datalogi)

DOI

10.1016/j.jss.2024.112070

Mer information

Senast uppdaterat

2025-05-20