Detecting Build Conflicts in Software Merge for Java Programs via Static Analysis
Sheikh Shadab Towqir, Bowen Shen, Muhammad Ali Gulzar, Na Meng
Abstract
In software merge, the edits from different branches can textually overlap (i.e., textual conflicts) or cause build and test errors (i.e., build and test conflicts), jeopardizing programmer productivity and software quality. Existing tools primarily focus on textual conflicts; few tools detect higher-order conflicts (i.e., build and test conflicts). However, existing detectors of build conflicts are limited. Due to their heavy usage of automatic build, current detectors (e.g., Crystal) only report build errors instead of identifying the root causes; developers have to manually locate conflicting edits. These detectors only help when the branches-to-merge have no textual conflict. We present a new static analysis-based approach Bucond ("build conflict detector"). Given three code versions in a merging scenario: base b, left l, and right r , Bucond models each version as a graph, and compares graphs to extract entity-related edits (e.g., class renaming) in l and r . We believe that build conflicts occur when certain edits are co-applied to related entities between branches. Bucond realizes this insight via pattern matching to identify any cross-branch edit combination that can trigger build conflicts (e.g., one branch adds a reference to field F while the other branch removes F). We systematically explored and devised 57 patterns, covering 97% of the build conflicts in our experiments. Our evaluation shows Bucond to complement build-based detectors, as it (1) detects conflicts with 100% precision and 88%-100% recall, (2) locates conflicting edits, and (3) works well when those detectors do not. CCS CONCEPTS • Software and its engineering → Software maintenance tools; Collaboration in software development.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers1
Ask how each one uses itBuilds on1
Related papers
- Understanding the Implications of Changes to Build SystemsMahtab Nejati, Mahmoud Alfadel, Shane McIntoshASE 2024 · 1 citation
- What Happened in This Pipeline? Diffing Build Logs with CiDiffNicolas Hubner, Jean-Rémy Falleri, Raluca Uricaru, Thomas Degueule et al.ISSTA 2025
- Dependency Facade: The Coupling and Conflicts between Android Framework and Its CustomizationWuxia Jin, Yitong Dai, Jianguo Zheng, Yu Qu et al.ICSE 2023 · 8 citations
- Code Review of Build System Specifications: Prevalence, Purposes, Patterns, and PerceptionsMahtab Nejati, Mahmoud Alfadel, Shane McIntoshICSE 2023 · 8 citations
- Escaping dependency hell: finding build dependency errors with the unified dependency graphGang Fan, Chengpeng Wang, Rongxin Wu, Xiao Xiao et al.ISSTA 2020 · 37 citations
