一句话:首次将程序合成用于学习合并冲突解决:提出DSL从示例学习策略,可解决11.4%冲突且准确率93.2%。
本文以 Microsoft Edge(从 Chromium 主线分叉的大规模协作项目)为背景,研究文本合并冲突问题。作者首先对 Edge 中的文本合并冲突进行实证分析,按文件类型、冲突在文件中的位置和冲突规模分类,发现约 28% 的冲突仅为 1-2 行改动,且许多解决方案具有重复模式。受此启发,作者首次探索用程序合成学习并解决结构性合并冲突:提出一种新的领域特定语言(DSL)来刻画常见解决模式,并从示例解决方案中学习该 DSL 程序作为解决策略。评估表明,学到的策略能解决 C++ 文件中 11.4% 的冲突(约占 1-2 行改动的 41%),准确率达 93.2%。
Forking structure is widespread in the open-source repositories and that causes a significant number of merge conflicts. In this paper, we study the problem of textual merge conflicts from the perspective of Microsoft Edge, a large, highly collaborative fork off the main Chromium branch with significant merge conflicts. Broadly, this study is divided into two sections. First, we empirically evaluate textual merge conflicts in Microsoft Edge and classify them based on the type of files, location of conflicts in a file, and the size of conflicts. We found that ~28% of the merge conflicts are 1-2 line changes, and many resolutions have frequent patterns. Second, driven by these findings, we explore Program Synthesis (for the first time) to learn patterns and resolve structural merge conflicts. We propose a novel domain-specific language (DSL) that captures many of the repetitive merge conflict resolution patterns and learn resolution strategies as programs in this DSL from example resolutions. We found that the learned strategies can resolve 11.4% of the conflicts (~41% of 1-2 line changes) that arise in the C++ files with 93.2% accuracy.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{PanLNGLK21,
title = {Can Program Synthesis be Used to Learn Merge Conflict Resolutions? An Empirical Analysis},
author = {Rangeet Pan and Vu Le and Nachiappan Nagappan and Sumit Gulwani and Shuvendu Lahiri and Mike Kaufman},
booktitle = {ICSE},
year = {2021},
doi = {10.1109/icse43902.2021.00077}
}