Balancing precision and performance in structured merge

Software-merging techniques face the challenge of finding a balance between precision and performance. In practice, developers use unstructured-merge (i.e., line-based) tools, which are fast but imprecise. In academia, many approaches incorporate information on the structure of the artifacts being merged. While this increases precision in conflict detection and resolution, it can induce severe performance penalties. Striving for a proper balance between precision and performance, we propose a structured-merge approach with auto-tuning. In a nutshell, we tune the merge process on-line by switching between unstructured and structured merge, depending on the presence of conflicts. We implemented a corresponding merge tool for Java, called JDime. Our experiments with 50 real-world Java projects, involving 434 merge scenarios with over 51 million lines of code, demonstrate that our approach indeed hits a sweet spot: While largely maintaining a precision that is superior to that of unstructured merge, structured merge with auto-tuning is up to 92 times faster than purely structured merge, 10 times on average.

[1]  L. Bergroth,et al.  A survey of longest common subsequence algorithms , 2000, Proceedings Seventh International Symposium on String Processing and Information Retrieval. SPIRE 2000.

[2]  Judith E. Grass Cdiff: A Syntax Directed Differencer for C++ Programs , 1992, C++ Conference.

[3]  John C. Grundy,et al.  A generic approach to supporting diagram differencing and merging for collaborative design , 2005, ASE '05.

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

[5]  Bernhard Rumpe,et al.  CDDiff: Semantic Differencing for Class Diagrams , 2011, ECOOP.

[6]  Valdis Berzins,et al.  Software merge: semantics of combining changes to programs , 1994, TOPL.

[7]  Christoph Treude,et al.  Difference computation of large models , 2007, ESEC-FSE '07.

[8]  Daniel S. Hirschberg,et al.  A linear space algorithm for computing maximal common subsequences , 1975, Commun. ACM.

[9]  Ernst Lippe,et al.  Operation-based merging , 1992, SDE 5.

[10]  Gabriele Taentzer,et al.  Conflict Detection for Model Versioning Based on Graph Modifications , 2010, ICGT.

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

[12]  Richard F. Paige,et al.  Merging models with the epsilon merging language (EML) , 2006, MoDELS'06.

[13]  Wuu Yang,et al.  Identifying syntactic differences between two programs , 1991, Softw. Pract. Exp..

[14]  Jim Buffenbarger,et al.  Syntactic Software Merging , 1995, SCM.

[15]  Sven Apel,et al.  Structured merge with auto-tuning: balancing precision and performance , 2012, 2012 Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.

[16]  Richard M. Karp,et al.  Theoretical Improvements in Algorithmic Efficiency for Network Flow Problems , 1972, Combinatorial Optimization.

[17]  Walter F. Tichy,et al.  Extensible language-aware merging , 2002, International Conference on Software Maintenance, 2002. Proceedings..

[18]  Alessandro Orso,et al.  JDiff: A differencing technique and tool for object-oriented programs , 2006, Automated Software Engineering.

[19]  Tao Jiang,et al.  Some MAX SNP-Hard Results Concerning Unordered Labeled Trees , 1994, Inf. Process. Lett..

[20]  Maximilian Koegel,et al.  Operation-based conflict detection and resolution , 2009, 2009 ICSE Workshop on Comparison and Versioning of Software Models.

[21]  Alexander Schrijver,et al.  Combinatorial optimization. Polyhedra and efficiency. , 2003 .

[22]  Daniel Jackson,et al.  Semantic Diff: a tool for summarizing the effects of modifications , 1994, Proceedings 1994 International Conference on Software Maintenance.

[23]  Harold W. Kuhn,et al.  The Hungarian method for the assignment problem , 1955, 50 Years of Integer Programming.

[24]  Ralph E. Johnson,et al.  Refactoring-Aware Configuration Management for Object-Oriented Programs , 2007, 29th International Conference on Software Engineering (ICSE'07).

[25]  Bernhard Westfechtel,et al.  Structure-oriented merging of revisions of software documents , 1991, SCM '91.