Automated Software Engineering

, Volume 22, Issue 3, pp 367–397 | Cite as

Balancing precision and performance in structured merge

Article
  • 253 Downloads

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.

Keywords

Version control Software merging Structured merge JDime 

Notes

Acknowledgments

We thank Christian Kästner for feedback on the potential of this work, and for the design we used in the Figs. 1 and 2. This work has been supported by the DFG Grants: AP 206/2, AP 206/4, and AP 206/5.

References

  1. 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)Google Scholar
  2. 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)Google Scholar
  3. Apiwattanapong, T., Orso, A., Harrold, M.: JDiff: a differencing technique and tool for object-oriented programs. Autom. Softw. Eng. 14(1), 3–36 (2007)Google Scholar
  4. Bergroth, L., Hakonen, H., Raita, T.: A survey of longest common subsequence algorithms, pp. 39–48. In: Proceedings of the SPIRE, IEEE, (2000)Google Scholar
  5. Berzins, V.: Software merge: semantics of combining changes to programs. ACM TOPLAS 16(6), 1875–1903 (1994)CrossRefGoogle Scholar
  6. Buffenbarger, J.: Syntactic software merging. In: Selected Papers from SCM-4 and SCM-5, Springer, LNCS 1005, pp 153–172, (1995)Google Scholar
  7. 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)Google Scholar
  8. Edmonds, J., Karp, R.M.: Theoretical improvements in algorithmic efficiency for network flow problems. J. ACM 19(2), 248–264 (1972)CrossRefGoogle Scholar
  9. Grass, J.: Cdiff: a syntax directed differencer for C++ programs, pp. 181–193. In: Proceedings of USENIX C++ Conference, USENIX Association, (1992)Google Scholar
  10. Hirschberg, D.: A linear space algorithm for computing maximal common subsequences. Commun. ACM 18(6), 341–343 (1975)CrossRefGoogle Scholar
  11. Hunt, J., Tichy, W.: Extensible language-aware merging, pp. 511–520. In: Proceedings of ICSM, IEEE, (2002)Google Scholar
  12. Jackson, D., Ladd, D.: Semantic Diff: A tool for summarizing the effects of modifications, pp. 243–252. In: Proceedings of the ICSM, IEEE, (1994)Google Scholar
  13. Koegel, M., Helming, J., Seyboth, S.: Operation-based conflict detection and resolution, pp. 43–48. In: Proceedings of the CVSM, IEEE, (2009)Google Scholar
  14. 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)Google Scholar
  15. Kuhn, H.: The hungarian method for the assignment problem. Naval Res. Logist. Q. 2(1–2), 83–97 (1955)CrossRefGoogle Scholar
  16. Lippe, E., van Oosterom, N.: Operation-based merging, pp. 78–87. In: Proceedings of the SDE, ACM, (1992)Google Scholar
  17. 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)Google Scholar
  18. 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)Google Scholar
  19. Mens, T.: A state-of-the-art survey on software merging. IEEE TSE 28(5), 449–462 (2002)Google Scholar
  20. Schrijver, A.: Combinatorial Optimization: Polyhedra and Efficiency. Springer, Heidelberg (2002)Google Scholar
  21. 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)Google Scholar
  22. Treude, C., Berlik, S., Wenzel, S., Kelter, U.: Difference computation of large models, pp. 295–304. In: Proceedings of the ESEC/FSE, ACM, (2007)Google Scholar
  23. Westfechtel, B.: Structure-oriented merging of revisions of software documents, pp. 68–79. In: Proceedings of the SCM, ACM, (1991)Google Scholar
  24. Yang, W.: Identifying syntactic differences between two programs. Softw.: Pract. Exp. 21(7), 739–755 (1991)Google Scholar
  25. Zhang, K., Jiang, T.: Some MAX SNP-hard results concerning unordered labeled trees. Inf. Process. Lett. 49(5), 249–254 (1994)CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  1. 1.PassauGermany

Personalised recommendations