Automatic Software Merging using Automated Program Repair

Resolution of merge conflicts is inevitable in con-current software development where source code has been independently modified by multiple programmers. Unfortunately, it requires a lot of human efforts since programmers have to change the conflicting code until the merged code can be compiled with no error and does the correct behavior expected by themselves. Although several techniques have been proposed to (semi-)automatically resolve textual, syntactic, and semantic merge conflicts, behavioral conflicts are still a big trouble for modern software development using version control systems. In this paper, we propose an automatic merge mechanism that reduces programmers’ burden to resolve behavioral merge conflicts, by exploiting an automated program repair (APR) technique that fully-automatically fixes faults (the unexpected behavior) exposed by tests. To make the automatic merge mechanism feasible, it produces initial programs to be fixed by combining class members within the code to be merged. Moreover, it aggressively takes in code fragments within programs to be merged into the ingredient space. Our experimental results successfully demonstrate that an APR technique can solve behavioral conflicts with no intervention of human.

[1]  Name M. Lastname Automatically Finding Patches Using Genetic Programming , 2013 .

[2]  A.J.C. van Gemund,et al.  On the Accuracy of Spectrum-based Fault Localization , 2007, Testing: Academic and Industrial Conference Practice and Research Techniques - MUTATION (TAICPART-MUTATION 2007).

[3]  Robert J. Walker,et al.  Branching and merging: an investigation into current version control practices , 2011, CHASE.

[4]  Thomas W. Reps,et al.  Integrating noninterfering versions of programs , 1989, TOPL.

[5]  Fan Long,et al.  An Analysis of the Search Spaces for Generate and Validate Patch Generation Systems , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[6]  Sarfraz Khurshid,et al.  Towards Practical Program Repair with On-demand Candidate Generation , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[7]  Mark Harman,et al.  Automated software transplantation , 2015, ISSTA.

[8]  Matias Martinez ASTOR: A Program Repair Library for Java , 2016 .

[9]  Matias Martinez,et al.  Automatic repair of real bugs in java: a large-scale experiment on the defects4j dataset , 2016, Empirical Software Engineering.

[10]  David Lo,et al.  [Journal First] Overfitting in Semantics-Based Automated Program Repair , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[11]  Yuriy Brun,et al.  Is the cure worse than the disease? overfitting in automated program repair , 2015, ESEC/SIGSOFT FSE.

[12]  Ernst Lippe,et al.  Operation-based merging , 1992 .

[13]  António Rito Silva,et al.  Improving early detection of software merge conflicts , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[14]  Sven Apel,et al.  Semistructured merge: rethinking merge in revision control systems , 2011, ESEC/FSE '11.

[15]  Bryan O'Sullivan,et al.  Making Sense of Revision-control Systems , 2009, ACM Queue.

[16]  Shinji Kusumoto,et al.  kGenProg: A High-Performance, High-Extensibility and High-Portability APR System , 2018, 2018 25th Asia-Pacific Software Engineering Conference (APSEC).

[17]  Tom Mens,et al.  A State-of-the-Art Survey on Software Merging , 2002, IEEE Trans. Software Eng..

[18]  Katsuhisa Maruyama,et al.  Supporting Merge Conflict Resolution by Using Fine-Grained Code Change History , 2016, 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[19]  Matias Martinez,et al.  ASTOR: a program repair library for Java (demo) , 2016, ISSTA.

[20]  Claire Le Goues,et al.  JFIX: semantics-based repair of Java programs via symbolic PathFinder , 2017, ISSTA.