Merge Conflict Resolution: Classification or Generation?
Jinhao Dong, Qihao Zhu, Zeyu Sun, Yiling Lou, Dan Hao
摘要
Collaborative development is critical to improve the productivity. Multiple contributors work simultaneously on the same project and might make changes to the same code locations. This can cause conflicts and require manual intervention from developers to resolve them. To alleviate the human efforts of manual conflict resolution, researchers have proposed various automatic techniques. More recently, deep learning models have been adopted to solve this problem and achieved state-of-the-art performance. However, these techniques leverage classification to combine the existing elements of input. The classification- based models cannot generate new tokens or produce flexible combinations, and have a wrong hypothesis that fine-grained conflicts of one single coarse-grained conflict are independent. In this work, we propose to generate the resolutions of merge conflicts from a totally new perspective, that is, generation, and we present a conflict resolution technique, MergeGen. First, we design a structural and fine-grained conflict-aware representation for the merge conflicts. Then, we propose to leverage an encoder- decoder-based generative model to process the designed conflict representation and generate the resolutions auto-regressively. We further perform a comprehensive study to evaluate the effectiveness of MergeGen. The quantitative results show that MergeGen outperforms the state-of-the-art (SOTA) techniques from both precision and accuracy. Our evaluation on multiple programming languages verifies the good generalization ability of MergeGen. In addition, the ablation study shows that the major component of our technique makes a positive contribution to the performance of MergeGen, and the granularity analysis reveals the high tolerance of MergeGen to coarse-grained conflicts. Moreover, the analysis on generating new tokens further proves the advance of generative models.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper2
- Mutual Learning-Based Framework for Enhancing Robustness of Code Models via Adversarial TrainingYangsen Wang, Yizhou Chen, Yifan Zhao, Zhihao Gong 等ASE 2024 · 被引用 3 次
- CodeMapper: A Language-Agnostic Approach to Mapping Code Regions Across CommitsHuimin Hu, Michael PradelICSE 2026
它引用的顶会 Paper4
- CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 被引用 1,224 次
- TreeGen: A Tree-Based Transformer Architecture for Code GenerationZeyu Sun, Qihao Zhu, Yingfei Xiong, Yican Sun 等AAAI 2020 · 被引用 196 次
- FIRA: Fine-Grained Graph-Based Code Change Representation for Automated Commit Message GenerationJinhao Dong, Yiling Lou, Qihao Zhu, Zeyu Sun 等ICSE 2022 · 被引用 50 次
- Program merge conflict resolution via neural transformersAlexey Svyatkovskiy, Sarah Fakhoury, Negar Ghorbani, Todd Mytkowicz 等FSE 2022 · 被引用 33 次
相关 Paper
- EditFusion: Resolving Code Merge Conflicts via Edit SelectionChangxin Wang, Lei Xu, Rundong Wang, Yiming Ma 等ASE 2025
- Planning for untangling: predicting the difficulty of merge conflictsCaius Brindescu, Iftekhar Ahmed, Rafael Leano, Anita SarmaICSE 2020 · 被引用 19 次
- Revisiting the Conflict-Resolving Problem from a Semantic PerspectiveJinhao Dong, Jun Sun, Yun Lin, Yedi Zhang 等ASE 2024
- Can Program Synthesis be Used to Learn Merge Conflict Resolutions? An Empirical AnalysisRangeet Pan, Vu Le, Nachiappan Nagappan, Sumit Gulwani 等ICSE 2021 · 被引用 19 次
- Using pre-trained language models to resolve textual and semantic merge conflicts (experience paper)Jialu Zhang, Todd Mytkowicz, Mike Kaufman, Ruzica Piskac 等ISSTA 2022 · 被引用 30 次
