Logo image
Merge Conflict Resolution: Classification or Generation?
Conference proceeding

Merge Conflict Resolution: Classification or Generation?

Jinhao Dong, Qihao Zhu, Zeyu Sun, Yiling Lou, Dan Hao and IEEE
Proceedings of the 38th IEEE/ACM International Conference on Automated Software Engineering, pp.1652-1663
ACM Conferences
ASE '23: 38th IEEE/ACM International Conference on Automated Software Engineering
11/11/2023

Abstract

Hardware Hardware -- Power and energy Hardware -- Power and energy -- Power estimation and optimization Human-centered computing Human-centered computing -- Visualization Human-centered computing -- Visualization -- Visualization techniques Software and its engineering Software and its engineering -- Software creation and management Software and its engineering -- Software creation and management -- Collaboration in software development Software and its engineering -- Software notations and tools Software and its engineering -- Software notations and tools -- Software libraries and repositories Software and its engineering -- Software notations and tools -- Software maintenance tools Software and its engineering -- Software organization and properties Software and its engineering -- Software organization and properties -- Contextual software domains Software and its engineering -- Software organization and properties -- Contextual software domains -- Operating systems Software and its engineering -- Software organization and properties -- Contextual software domains -- Operating systems -- Process management Software and its engineering -- Software organization and properties -- Contextual software domains -- Operating systems -- Process management -- Concurrency control Theory of computation Theory of computation -- Logic Theory of computation -- Logic -- Logic and verification
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.

Metrics

1 Record Views

Details

Logo image