Understanding Software Merge Conflicts for Java Programs
dc.contributor.author | Shen, Bowen | en |
dc.contributor.committeechair | Meng, Na | en |
dc.contributor.committeemember | Butt, Ali | en |
dc.contributor.committeemember | Servant Cortes, Francisco Javier | en |
dc.contributor.committeemember | He, Fei | en |
dc.contributor.committeemember | Tilevich, Eli | en |
dc.contributor.department | Computer Science and#38; Applications | en |
dc.date.accessioned | 2025-05-08T08:00:16Z | en |
dc.date.available | 2025-05-08T08:00:16Z | en |
dc.date.issued | 2025-05-07 | en |
dc.description.abstract | In collaborative software development, developers create branches to add features and fix bugs tentatively to work in parallel. Periodically developers need to merge the branches to integrate edits. However, merge conflicts can arise when edits overlap or interfere with each other. Resolving merge conflicts is challenging and tedious. Prior work proposed tools to detect and solve conflicts. However, many questions are still not fully investigated, such as what types of conflicts exist in real-world applications and how developers or tools handle them. To solve this problem, we conducted an empirical study to investigate merge conflicts in 208 open-source repositories. We manually inspected 538 conflicts with three types (textual, build and test) and their resolutions to characterize merge conflicts from different angles. We also designed a benchmark, ConflictBench, to test various tools in terms of their capabilities of conflict detection and resolution. ConflictBench consists of 180 merging scenarios extracted from 180 open-source Java projects. We defined three novel metrics to evaluate merge tools. By applying five state-of-the-art tools to ConflictBench, we observed that ConflictBench is effective to characterize different tools. It helps reveal limitations of existing tools and sheds light on future research. Lastly, to measure the ability of large language model(LLM) in the area of merge conflicts, we apply two state-of-art LLMs, ChatGPT and Gemini, to our benchmark. This experiment reveal the advantage and limitation of LLMs in resolving merge conflicts. In summary, our research characterizes real-world merge conflicts as well as software merge tools, and test with LLMs in resolving conflicts. Our work will help developers better tackle the technical challenges posed by software merge conflicts, and shed light on future research in that area. | en |
dc.description.abstractgeneral | When multiple people work together to build software, they often make changes in separate "branches" to avoid interfering with each other's work. Eventually, these branches must be combined—a process called merging. However, this process doesn't always go smoothly. Sometimes, changes made by different developers conflict with one another, and fixing these conflicts can be difficult and time-consuming. In this research, we studied real-world examples of these merge conflicts by looking at 208 open-source software projects. We closely examined 538 specific conflict cases to understand what causes them and how developers fix them. We found three main types of conflicts: simple text issues, problems that prevent the software from building, and errors that cause tests to fail. To help developers and researchers, we created a benchmark called ConflictBench. It includes 180 real conflict scenarios from popular Java projects. We also came up with three new ways to measure how well merge tools perform. We tested five popular tools and found that while each tool has strengths, they all have limitations. Our benchmark helps highlight where current tools struggle and how they might be improved. Finally, we tested two advanced artificial intelligence models—OpenAI's ChatGPT and Google's Gemini—to see if they could help resolve merge conflicts. These AI tools showed promise, but also faced challenges. Overall, our work gives a clearer picture of the problems developers face when merging code and offers tools and insights that can help improve how these problems are handled. This research can lead to better software tools and more efficient collaboration for developers. | en |
dc.description.degree | Doctor of Philosophy | en |
dc.format.medium | ETD | en |
dc.identifier.other | vt_gsexam:42850 | en |
dc.identifier.uri | https://hdl.handle.net/10919/129386 | en |
dc.language.iso | en | en |
dc.publisher | Virginia Tech | en |
dc.rights | In Copyright | en |
dc.rights.uri | http://rightsstatements.org/vocab/InC/1.0/ | en |
dc.subject | software engineering | en |
dc.subject | merge conflict | en |
dc.title | Understanding Software Merge Conflicts for Java Programs | en |
dc.type | Dissertation | en |
thesis.degree.discipline | Computer Science & Applications | en |
thesis.degree.grantor | Virginia Polytechnic Institute and State University | en |
thesis.degree.level | doctoral | en |
thesis.degree.name | Doctor of Philosophy | en |
Files
Original bundle
1 - 1 of 1