Spork: Structured Merge for Java With Formatting Preservation
- 20 January 2022
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 49 (1) , 64-83
Abstract
The highly parallel workflows of modern software development have made merging of source code a common activity for developers. The state of the practice is based on line-based merge, which is ubiquitously used with git merge. Line-based merge is however a generalized technique for any text that cannot leverage the structured nature of source code, making merge conflicts a common occurrence. As a remedy, research has proposed structured merge tool, which typically operate on abstract syntax trees instead of raw text. Structured merging greatly reduces the prevalence of merge conflicts but suffers from important limitations, the main ones being a tendency to alter the formatting of the merged code and being prone to excessive running times. In this paper, we present SPORK, a novel structured merge tool for JAVA. SPORK is unique as it preserves formatting to a significantly greater degree than comparable state-of-the-art tools. SPORK is also overall faster than the state of the art, in particular significantly reducing worst-case performance in practice. We demonstrate these properties by replaying 1740 real-world file merges collected from 119 open-source projects, and further demonstrate several key differences between SPORK and the state of the art with in-depth case studies.Keywords
All Related Versions
This publication has 49 references indexed in Scilit:
- SPOON: A library for implementing analyses and transformations of Java source codeSoftware: Practice and Experience, 2015
- Fine-grained and accurate source code differencing2014
- How do centralized and distributed version control systems impact software changes?2014
- Balancing precision and performance in structured mergeAutomated Software Engineering, 2014
- Diversity in software engineering research2013
- Assessing the value of branches with what-if analysis2012
- Structured merge with auto-tuning: balancing precision and performance2012
- High-fidelity C/C++ code transformationScience of Computer Programming, 2007
- A state-of-the-art survey on software mergingIEEE Transactions on Software Engineering, 2002
- Structure-oriented merging of revisions of software documents1991