当前位置: X-MOL 学术arXiv.cs.SE › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Automatic Detection and Resolution of Software Merge Conflicts: Are We There Yet?
arXiv - CS - Software Engineering Pub Date : 2021-02-22 , DOI: arxiv-2102.11307
Bowen ShenVirginia Polytechnic Institute and State University, USA, Cihan XiaoVirginia Polytechnic Institute and State University, USA, Na MengVirginia Polytechnic Institute and State University, USA, Fei HeTsinghua University, China

Developers create software branches for tentative feature addition and bug fixing, and periodically merge branches to release software with new features or repairing patches. When the program edits from different branches textually overlap (i.e., textual conflicts), or the co-application of those edits lead to compilation or runtime errors (i.e., compiling or dynamic conflicts), it is challenging and time-consuming for developers to eliminate merge conflicts. Prior studies examined %the popularity of merge conflicts and how conflicts were related to code smells or software development process; tools were built to find and solve conflicts. However, some fundamental research questions are still not comprehensively explored, including (1) how conflicts were introduced, (2) how developers manually resolved conflicts, and (3) what conflicts cannot be handled by current tools. For this paper, we took a hybrid approach that combines automatic detection with manual inspection to reveal 204 merge conflicts and their resolutions in 15 open-source repositories. %in the version history of 15 open-source projects. Our data analysis reveals three phenomena. First, compiling and dynamic conflicts are harder to detect, although current tools mainly focus on textual conflicts. Second, in the same merging context, developers usually resolved similar textual conflicts with similar strategies. Third, developers manually fixed most of the inspected compiling and dynamic conflicts by similarly editing the merged version as what they did for one of the branches. Our research reveals the challenges and opportunities for automatic detection and resolution of merge conflicts; it also sheds light on related areas like systematic program editing and change recommendation.

中文翻译:

自动检测和解决软件合并冲突:我们到了吗?

开发人员创建软件分支以进行临时功能添加和错误修复,并定期合并分支以发布具有新功能或修复补丁的软件。当来自不同分支的程序编辑在文本上重叠(即,文本冲突),或者这些编辑的共同应用导致编译或运行时错误(即,编译或动态冲突),对于开发人员来说,消除这种挑战既费时又费力合并冲突。先前的研究检查了合并冲突的流行程度以及冲突与代码味道或软件开发过程之间的关系;建立了用于查找和解决冲突的工具。但是,仍未全面探讨一些基础研究问题,包括(1)如何引入冲突;(2)开发人员如何手动解决冲突;(3)当前工具无法解决哪些冲突。在本文中,我们采用了一种混合方法,将自动检测与手动检查相结合,以揭示15个开源存储库中的204个合并冲突及其解决方案。在15个开源项目的版本历史中。我们的数据分析揭示了三种现象。首先,尽管当前的工具主要集中在文本冲突上,但是编译冲突和动态冲突很难检测到。其次,在相同的合并上下文中,开发人员通常使用相似的策略解决相似的文本冲突。第三,开发人员通过像编辑分支版本一样对合并版本进行类似编辑,从而手动修复了大多数已检查的编译和动态冲突。我们的研究揭示了自动检测和解决合并冲突的挑战和机遇;
更新日期:2021-02-24
down
wechat
bug