arrow
Return

Spork: Structured Merge for Java With Formatting Preservation

delete2023-01-01
delete4
delete
OA
AI
S
S. Larsen
J
Jean‐Rémy Falleri
B
Benoît Baudry
M
Martin Monperrus *
DOI:10.1109/TSE.2022.3143766delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

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 & quot;git merge & quot;. 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 tools, 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 running times 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:
Codes
Java
Merging
Syntactics
Semantics
Computer languages
Time complexity
Version control
structured merge

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.8K
Citations:
1.1W

Organization

U
universite de bordeaux
Scholars:
2.7W
Papers: 1.9W
Citations: 37