Abstract
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.










Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Notes
The set of \(\mathcal {AP\!X}\) problems is a subset of \(\mathcal {N\!P}\) optimization problems for which polynomial-time approximation algorithms can be found.
References
Apel, S., Liebig, J., Brandl, B., Lengauer, C., Kästner, C.: Semistructured merge: rethinking merge in revision control systems, pp. 190–200. In: Proceedings of the ESEC/FSE, ACM, (2011)
Apel, S., Leßenich, O., Lengauer, C.: Structured merge with auto-tuning: balancing precision and performance, pp. 120–129. In: Proceedings of the ASE, ACM, (2012)
Apiwattanapong, T., Orso, A., Harrold, M.: JDiff: a differencing technique and tool for object-oriented programs. Autom. Softw. Eng. 14(1), 3–36 (2007)
Bergroth, L., Hakonen, H., Raita, T.: A survey of longest common subsequence algorithms, pp. 39–48. In: Proceedings of the SPIRE, IEEE, (2000)
Berzins, V.: Software merge: semantics of combining changes to programs. ACM TOPLAS 16(6), 1875–1903 (1994)
Buffenbarger, J.: Syntactic software merging. In: Selected Papers from SCM-4 and SCM-5, Springer, LNCS 1005, pp 153–172, (1995)
Dig, D., Manzoor, K., Johnson, R., Nguyen, T.: Refactoring-aware configuration management for object-oriented programs, pp. 427–436. In: Proceedings of the ICSE, IEEE, (2007)
Edmonds, J., Karp, R.M.: Theoretical improvements in algorithmic efficiency for network flow problems. J. ACM 19(2), 248–264 (1972)
Grass, J.: Cdiff: a syntax directed differencer for C++ programs, pp. 181–193. In: Proceedings of USENIX C++ Conference, USENIX Association, (1992)
Hirschberg, D.: A linear space algorithm for computing maximal common subsequences. Commun. ACM 18(6), 341–343 (1975)
Hunt, J., Tichy, W.: Extensible language-aware merging, pp. 511–520. In: Proceedings of ICSM, IEEE, (2002)
Jackson, D., Ladd, D.: Semantic Diff: A tool for summarizing the effects of modifications, pp. 243–252. In: Proceedings of the ICSM, IEEE, (1994)
Koegel, M., Helming, J., Seyboth, S.: Operation-based conflict detection and resolution, pp. 43–48. In: Proceedings of the CVSM, IEEE, (2009)
Kolovos, D., Paige, R., Polack, F.: Merging models with the epsilon merging language (EML), vol. 4199, pp. 215–229. In: Proceedings of the MODELS, Springer, LNCS, (2006)
Kuhn, H.: The hungarian method for the assignment problem. Naval Res. Logist. Q. 2(1–2), 83–97 (1955)
Lippe, E., van Oosterom, N.: Operation-based merging, pp. 78–87. In: Proceedings of the SDE, ACM, (1992)
Maoz, S., Ringert, J., Rumpe, B.: CDDiff: semantic differencing for class diagrams, vol. 6813, pp. 230–254. In: Proceedings of the ECOOP, Springer, LNCS, (2011)
Mehra, A., Grundy, J., Hosking, J.: A generic approach to supporting diagram differencing and merging for collaborative design, pp. 204–213. In: Proceedings of the ASE, ACM, (2005)
Mens, T.: A state-of-the-art survey on software merging. IEEE TSE 28(5), 449–462 (2002)
Schrijver, A.: Combinatorial Optimization: Polyhedra and Efficiency. Springer, Heidelberg (2002)
Taentzer, G., Ermel, C., Langer, P., Wimmer, M.: Conflict detection for model versioning based on graph modifications, vol. 6372, pp. 171–186. In: Proceedings of the ICGT, Springer, LNCS, (2010)
Treude, C., Berlik, S., Wenzel, S., Kelter, U.: Difference computation of large models, pp. 295–304. In: Proceedings of the ESEC/FSE, ACM, (2007)
Westfechtel, B.: Structure-oriented merging of revisions of software documents, pp. 68–79. In: Proceedings of the SCM, ACM, (1991)
Yang, W.: Identifying syntactic differences between two programs. Softw.: Pract. Exp. 21(7), 739–755 (1991)
Zhang, K., Jiang, T.: Some MAX SNP-hard results concerning unordered labeled trees. Inf. Process. Lett. 49(5), 249–254 (1994)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Leßenich, O., Apel, S. & Lengauer, C. Balancing precision and performance in structured merge. Autom Softw Eng 22, 367–397 (2015). https://doi.org/10.1007/s10515-014-0151-5
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10515-014-0151-5