Abstract
Resolving conflicts is the main challenge for software merging. The existing merge tools usually rely on the developer to manually resolve conflicts. This is of course inefficient. We propose an interactive approach for resolving merge conflicts. To the best of our knowledge, this is the first attempt for conflict resolution of structured merge. To represent the possibly very large set of candidate programs, we propose an expressive and efficient representation by version space algebra. We also design a simple mechanism for ranking resolutions in the program space, such that the top-ranked resolution is very likely to meet the developer's expectation. We prototype our approach as a merge tool AutoMerge, and evaluate it on 244 real-world conflicts arising from 10 open-source projects. Results show great practicality of our approach.
- Sven Apel, Jörg Liebig, Benjamin Brandl, Christian Lengauer, and Christian Kästner. 2011. Semistructured Merge: Rethinking Merge in Revision Control Systems. In Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering (ESEC/FSE ’11). ACM, New York, NY, USA, 190–200. Google Scholar
Digital Library
- Taweesup Apiwattanapong, Alessandro Orso, and Mary Jean Harrold. 2007. JDiff: A differencing technique and tool for objectoriented programs. Automated Software Engineering 14, 1 (01 Mar 2007), 3–36. Google Scholar
Digital Library
- Shaon Barman, Sarah Chasins, Rastislav Bodik, and Sumit Gulwani. 2016. Ringer: web automation by demonstration. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM, 748–764. Google Scholar
Digital Library
- James Bornholt, Emina Torlak, Dan Grossman, and Luis Ceze. 2016. Optimizing Synthesis with Metasketches. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’16). ACM, 775–788. Google Scholar
Digital Library
- Jim Buffenbarger. 1995. Syntactic software merging. In Software Configuration Management, Jacky Estublier (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 153–172. Google Scholar
Digital Library
- Guilherme Cavalcanti, Paulo Borba, and Paola Accioly. 2017. Evaluating and Improving Semistructured Merge. Proc. ACM Program. Lang. 1, OOPSLA, Article 59 (Oct. 2017), 27 pages. Google Scholar
Digital Library
- Danny Dig, Kashif Manzoor, Ralph E. Johnson, and Tien N. Nguyen. 2008. Effective Software Merging in the Presence of Object-Oriented Refactorings. IEEE Trans. Softw. Eng. 34, 3 (May 2008), 321–335. Google Scholar
Digital Library
- Georg Dotzler and Michael Philippsen. 2016. Move-optimized Source Code Tree Differencing. In Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering (ASE 2016). ACM, New York, NY, USA, 660–671. Google Scholar
Digital Library
- John K. Feser, Swarat Chaudhuri, and Isil Dillig. 2015. Synthesizing Data Structure Transformations from Input-output Examples. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’15). ACM, New York, NY, USA, 229–239. Google Scholar
Digital Library
- Sumit Gulwani. 2011. Automating String Processing in Spreadsheets Using Input-output Examples. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’11). ACM, 317–330. Google Scholar
Digital Library
- Sumit Gulwani, Javier Esparza, Orna Grumberg, and Salomon Sickert. 2016. Programming by Examples (and its applications in Data Wrangling). Verification and Synthesis of Correct and Secure Systems (2016).Google Scholar
- Björn Hartmann, Daniel MacDougall, Joel Brandt, and Scott R. Klemmer. 2010. What Would Other Programmers Do: Suggesting Solutions to Error Messages. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI ’10). ACM, New York, NY, USA, 1019–1028. Google Scholar
Digital Library
- D. Jackson and D. A. Ladd. 1994. Semantic Diff: a tool for summarizing the effects of modifications. In Proceedings 1994 International Conference on Software Maintenance. 243–252. Google Scholar
Digital Library
- Dileep Kini and Sumit Gulwani. 2015. FlashNormalize: Programming by examples for text normalization. In Proceedings of the 24th International Conference on Artificial Intelligence. AAAI Press, 776–783. Google Scholar
Digital Library
- Maximilian Koegel, Jonas Helming, and Stephan Seyboth. 2009. Operation-based Conflict Detection and Resolution. In Proceedings of the 2009 ICSE Workshop on Comparison and Versioning of Software Models (CVSM ’09). IEEE Computer Society, Washington, DC, USA, 43–48. Google Scholar
Digital Library
- Tessa A. Lau, Pedro Domingos, and Daniel S. Weld. 2000. Version Space Algebra and Its Application to Programming by Demonstration. In Proceedings of the Seventeenth International Conference on Machine Learning (ICML ’00). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 527–534. http://dl.acm.org/citation.cfm?id=645529.657973 Google Scholar
Digital Library
- Vu Le and Sumit Gulwani. 2014. FlashExtract: A Framework for Data Extraction by Examples. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’14). ACM, 542–553. Google Scholar
Digital Library
- O. Leßenich, S. Apel, C. Kästner, G. Seibt, and J. Siegmund. 2017. Renaming and shifted code in structured merging: Looking ahead for precision and performance. In 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE). 543–553. Google Scholar
Digital Library
- Olaf Leßenich, Sven Apel, and Christian Lengauer. 2015. Balancing precision and performance in structured merge. Automated Software Engineering 22, 3 (01 Sep 2015), 367–397. Google Scholar
Digital Library
- Ernst Lippe and Norbert van Oosterom. 1992. Operation-based Merging. In Proceedings of the Fifth ACM SIGSOFT Symposium on Software Development Environments (SDE 5). ACM, New York, NY, USA, 78–87. Google Scholar
Digital Library
- Fan Long and Martin Rinard. 2015. Staged program repair with condition synthesis. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering. ACM, 166–178. Google Scholar
Digital Library
- Guido Malpohl, James J. Hunt, and Walter F. Tichy. 2003. Renaming Detection. Automated Software Engineering 10, 2 (01 Apr 2003), 183–202. Google Scholar
Digital Library
- T. Mens. 2002. A state-of-the-art survey on software merging. IEEE Transactions on Software Engineering 28, 5 (May 2002), 449–462. Google Scholar
Digital Library
- Tom M. Mitchell. 1982. Generalization as search. Artificial Intelligence 18, 2 (1982), 203 – 226.Google Scholar
Cross Ref
- Hoan Anh Nguyen, Tung Thanh Nguyen, Gary Wilson, Jr., Anh Tuan Nguyen, Miryung Kim, and Tien N. Nguyen. 2010. A Graph-based Approach to API Usage Adaptation. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA ’10). ACM, New York, NY, USA, 302–321. Google Scholar
Digital Library
- N. Niu, F. Yang, J. R. C. Cheng, and S. Reddivari. 2013. Conflict resolution support for parallel software development. IET Software 7, 1 (February 2013), 1–11.Google Scholar
Digital Library
- Oleksandr Polozov and Sumit Gulwani. 2015. FlashMeta: A framework for inductive program synthesis. ACM SIGPLAN Notices 50, 10 (2015), 107–126. Google Scholar
Digital Library
- Kyle Prete, Napol Rachatasumrit, Nikita Sudan, and Miryung Kim. 2010. Template-based Reconstruction of Complex Refactorings. In Proceedings of the 2010 IEEE International Conference on Software Maintenance (ICSM ’10). IEEE Computer Society, Washington, DC, USA, 1–10. Google Scholar
Digital Library
- Reudismam Rolim, Gustavo Soares, Loris D’Antoni, Oleksandr Polozov, Sumit Gulwani, Rohit Gheyi, Ryo Suzuki, and Björn Hartmann. 2017. Learning Syntactic Program Transformations from Examples. In Proceedings of the 39th International Conference on Software Engineering (ICSE ’17). IEEE Press, Piscataway, NJ, USA, 404–415. Google Scholar
Digital Library
- Rishabh Singh and Sumit Gulwani. 2012. Learning Semantic String Transformations from Examples. Proc. VLDB Endow. 5, 8 (April 2012), 740–751. Google Scholar
Digital Library
- Rishabh Singh, Sumit Gulwani, and Armando Solar-Lezama. 2013. Automated Feedback Generation for Introductory Programming Assignments. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’13). ACM, 15–26. Google Scholar
Digital Library
- P. Weissgerber and S. Diehl. 2006. Identifying Refactorings from Source-Code Changes. In 21st IEEE/ACM International Conference on Automated Software Engineering (ASE’06). 231–240. Google Scholar
Digital Library
- Bernhard Westfechtel. 1991. Structure-oriented Merging of Revisions of Software Documents. In Proceedings of the 3rd International Workshop on Software Configuration Management (SCM ’91). ACM, New York, NY, USA, 68–79. Google Scholar
Digital Library
- Navid Yaghmazadeh, Christian Klinger, Isil Dillig, and Swarat Chaudhuri. 2016. Synthesizing Transformations on Hierarchically Structured Data. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’16). ACM, 508–521. Google Scholar
Digital Library
- Kaizhong Zhang and Tao Jiang. 1994. Some MAX SNP-hard Results Concerning Unordered Labeled Trees. Inf. Process. Lett. 49, 5 (March 1994), 249–254. Google Scholar
Digital Library
- T. Zimmermann. 2007. Mining Workspace Updates in CVS. In Fourth International Workshop on Mining Software Repositories (MSR’07:ICSE Workshops 2007). 11–11. Google Scholar
Digital Library
Index Terms
Conflict resolution for structured merge via version space algebra
Recommendations
Towards Merge Conflict Resolution by Combining Existing Lines of Code
SBES '22: Proceedings of the XXXVI Brazilian Symposium on Software EngineeringSoftware developers often need to combine their contributions. This operation is called merge. When the contributions happen at the same physical region in the source code, the merge is marked as conflicting and must be manually resolved by the ...
A Characterization Study of Merge Conflicts in Java Projects
In collaborative software development, programmers create software branches to add features and fix bugs tentatively, and then merge branches to integrate edits. When edits from different branches textually overlap (i.e., textual conflicts) or lead to ...
Enhancing precision of structured merge by proper tree matching
ICSE '19: Proceedings of the 41st International Conference on Software Engineering: Companion ProceedingsRecently, structured merge has shown its advantage in improving the merge precision over conventional line-based, unstructured merge. A typical structured merge algorithm consists of matching and amalgamation on abstract syntax trees. Existing tree ...






Comments