Can Pre-trained Language Models be Used to Resolve Textual and Semantic Merge Conflicts?

11/23/2021
by   Jialu Zhang, et al.
0

Program merging is standard practice when developers integrate their individual changes to a common code base. When the merge algorithm fails, this is called a merge conflict. The conflict either manifests in textual merge conflicts where the merge fails to produce code, or semantic merge conflicts where the merged code results in compiler or test breaks. Resolving these conflicts for large code projects is expensive because it requires developers to manually identify the sources of conflict and correct them. In this paper, we explore the feasibility of automatically repairing merge conflicts (both textual and semantic) using k-shot learning with large neural language models (LM) such as GPT-3. One of the challenges in leveraging such language models is to fit the examples and the queries within a small prompt (2048 tokens). We evaluate LMs and k-shot learning for two broad applications: (a) textual and semantic merge conflicts for a divergent fork Microsoft Edge, and (b) textual merge conflicts for a large number of JavaScript projects in GitHub. Our results are mixed: one one-hand, LMs provide the state-of-the-art (SOTA) performance on semantic merge conflict resolution for Edge compared to earlier symbolic approaches; on the other hand, LMs do not yet obviate the benefits of fine-tuning neural models (when sufficient data is available) or the design of special purpose domain-specific languages (DSL) for restricted patterns for program synthesis.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/02/2021

Can Program Synthesis be Used to Learn Merge Conflict Resolutions? An Empirical Analysis

Forking structure is widespread in the open-source repositories and that...
research
08/31/2021

MergeBERT: Program Merge Conflict Resolution via Neural Transformers

Collaborative software development is an integral part of the modern sof...
research
02/19/2018

Verifying Semantic Conflict-Freedom in Three-Way Program Merges

Even though many programmers rely on 3-way merge tools to integrate chan...
research
07/14/2019

Predicting Merge Conflicts in Collaborative Software Development

Background. During collaborative software development, developers often ...
research
02/29/2020

Automated Regression Unit Test Generation for Program Merges

Merging other branches into the current working branch is common in coll...
research
02/22/2021

Automatic Detection and Resolution of Software Merge Conflicts: Are We There Yet?

Developers create software branches for tentative feature addition and b...
research
05/17/2021

DeepMerge: Learning to Merge Programs

Program merging is ubiquitous in modern software development. Although c...

Please sign up or login with your details

Forgot password? Click here to reset