arrow
返回

A Characterization Study of Merge Conflicts in Java Projects

delete2023-03-31
delete7
delete
OA
AI
B
Bowen Shen *
M
Muhammad Ali Gulzar
贺飞 封面图
贺飞 (Fei He)
N
Na Meng
DOI:10.1145/3546944delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
In collaborative software development, programmers create software branches to add features and fix bugs tentatively, and then merge branches to integrate edits. When edits from different branches textually overlap (i.e., textual conflicts) or lead to compilation and runtime errors (i.e., build and test conflicts), it is challenging for developers to remove such conflicts. Prior work proposed tools to detect and solve conflicts. They investigate how conflicts relate to code smells and the software development process. 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. For this article, we used automated textual merge, compilation, and testing to reveal three types of conflicts in 208 open-source repositories: textual conflicts, build conflicts (i.e., conflicts causing build errors), and test conflicts (i.e., conflicts triggering test failures). We manually inspected 538 conflicts and their resolutions to characterize merge conflicts from different angles. Our analysis revealed three interesting phenomena. First, higher-order conflicts (i.e., build and test conflicts) are harder to detect and resolve, while existing tools mainly focus on textual conflicts. Second, developers manually resolved most higher-order conflicts by applying similar edits to multiple program locations; their conflict resolutions share common editing patterns implying great opportunities for future tool design. Third, developers resolved 64% of true textual conflicts by keeping complete edits from either a left or right branch. Unlike prior studies, our research for the first time thoroughly characterizes three types of conflicts, with a special focus on higher-order conflicts and limitations of existing tool design. Our work will shed light on future research of software merge.
Keyword:
Empirical
software merge
conflict detection
conflict resolution

期刊

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
论文数:
1.2K
被引数:
3.4K

机构

T
tsinghua university
学者数:
11.9W
论文数: 10.0W
被引数: 137
引用论文

引用论文

On the Nature of Merge Conflicts: A Study of 2,731 Open Source Java Projects Hosted by GitHub
err2020-08-01
err43
errOAAI
errGhiotto, Gleiph; Murta, Leonardo; Barros, Marcio; van der Hoek, Andre
err分享
err收藏
Management of the radial composite donor site: an orthopaedic opinion
err1999-06-01
err0
PREAI
errA.J. Sidebottom; P.E. Allen; M. Hayton; E.D. Vaughan; J.S. Brown
err分享
err收藏
Awareness and knowledge of anal cancer in a community-recruited sample of HIV-negative and HIV-positive gay and bisexual men
err2019-01-01
err0
PREAI
errLance Feeney; Mary Poynten; Fengyi (Jeff) Jin; Craig Cooper; David J. Templeton; Matthew R. O'Dwyer; Andrew Grulich; Richard J. Hillman
err分享
err收藏
err分享
err收藏
Local immune response in experimental pyelonephritis
err1968-11-01
err0
errOAAI
errJames D. Lehmann; James W. Smith; Thomas E. Miller; Jack A. Barnett; Jay P. Sanford
err分享
err收藏
学者 查看更多内容