Automating The Detection and Resolution of Build Conflicts in Software Merge for Java Programs

Loading...
Thumbnail Image

TR Number

Date

2026-01-14

Journal Title

Journal ISSN

Volume Title

Publisher

Virginia Tech

Abstract

Version control systems (VCS) like Git provide an efficient environment for collaborative software development. However, a major challenge of using such systems is the conflicts that occur when developers try to merge branches. This research focuses on build conflicts--a category of higher-order software merge conflicts. The goal of our research is to develop and implement methodologies that automate the detection and resolution process of build conflicts. Our research consists of three pieces. First, we designed and implemented a graph-based pattern matching approach, BUCOND (Build Conflict Detector), to detect conflicts via static analysis. Our evaluation shows that BUCOND accurately identified build conflicts on both synthetic and real-world datasets; it demonstrated great applicability in scenarios where compiler-based tools are inapplicable. Second, we created a hybrid program transformation approach, BuCoR (Build Conflict Resolver), to opportunistically resolve conflicts. We evaluated BuCoR in real-world merging scenarios, observing its great capabilities of generating syntactically correct resolutions and mimicking human developers' resolution practices. Third, we explored a new approach of resolving conflicts using LLMs, and empirically compared the usage of different LLMs as well as diverse prompt designs. We demonstrate that, when properly guided, LLMs can provide highly accurate conflict resolutions. Our research will help developers detect conflicts more efficiently and resolve conflicts with higher effectiveness as well as rigor. Through addressing issues caused by merge conflicts, it will help improve programmer productivity and software reliability.

Description

Keywords

Software Merge, Build Conflict, Static Analysis, Pattern Matching, Program Transformation, Large Language Models (LLMs)

Citation