Spork: Structured Merge for Java with Formatting Preservation
2023 (English)In: IEEE Transactions on Software Engineering, ISSN 0098-5589, E-ISSN 1939-3520, Vol. 49, no 1, p. 64-83Article in journal (Refereed) Published
Abstract [en]
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.
Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers (IEEE) , 2023. Vol. 49, no 1, p. 64-83
Keywords [en]
Codes, Computer languages, Java, Merging, Semantics, structured merge, Syntactics, Time complexity, Version control, Abstracting, Codes (symbols), Java programming language, Open source software, Software design, Trees (mathematics), Code, Highly parallels, Source codes, State of the art, State of the practice, Work-flows
National Category
Computer Sciences Software Engineering
Identifiers
URN: urn:nbn:se:kth:diva-319611DOI: 10.1109/TSE.2022.3143766ISI: 001020827200004Scopus ID: 2-s2.0-85123384747OAI: oai:DiVA.org:kth-319611DiVA, id: diva2:1701299
Funder
Wallenberg AI, Autonomous Systems and Software Program (WASP)Swedish Foundation for Strategic Research, trustfull
Note
QC 20250513
2022-10-052022-10-052025-05-13Bibliographically approved