Detecting Semantic Conflicts Via Automated Behavior Change Detection
Paper in proceeding, 2020

Branching and merging are common practices in collaborative software development. They increase developer productivity by fostering teamwork, allowing developers to independently contribute to a software project. Despite such benefits, branching and merging comes at a cost-the need to merge software and to resolve merge conflicts, which often occur in practice. While modern merge techniques, such as 3-way or structured merge, can resolve many such conflicts automatically, they fail when the conflict arises not at the syntactic, but the semantic level. Detecting such conflicts requires understanding the behavior of the software, which is beyond the capabilities of most existing merge tools. As such, semantic conflicts can only be identified and fixed with significant effort and knowledge of the changes to be merged. While semantic merge tools have been proposed, they are usually heavyweight, based on static analysis, and need explicit specifications of program behavior. In this work, we take a different route and explore the automated creation of unit tests as partial specifications to detect unwanted behavior changes (conflicts) when merging software.We systematically explore the detection of semantic conflicts through unit-test generation. Relying on a ground-truth dataset of 38 software merge scenarios, which we extracted from GitHub, we manually analyzed them and investigated whether semantic conflicts exist. Next, we apply test-generation tools to study their detection rates. We propose improvements (code transformations) and study their effectiveness, as well as we qualitatively analyze the detection results and propose future improvements. For example, we analyze the generated test suites for false-negative cases to understand why the conflict was not detected. Our results evidence the feasibility of using test-case generation to detect semantic conflicts as a method that is versatile and requires only limited deployment effort in practice, as well as it does not require explicit behavior specifications.

Behavior Change Detection

Differential Testing

Semantic Conflicts


Leuson Da Silva

Federal University of Pernambuco

Paulo Borba

Federal University of Pernambuco

Wardah Mahmood

University of Gothenburg

Thorsten Berger

University of Gothenburg

Joao Moisakis

Federal University of Pernambuco

2020 IEEE International Conference on Software Maintenance and Evolution (ICSME)

2020 IEEE International Conference on Software Maintenance and Evolution (ICSME)
Adelaide, SA, Australia, Australia,

Subject Categories

Software Engineering

Computer Science

Computer Systems



More information

Latest update