Spork: Structured Merge for Java with Formatting Preservation

02/10/2022
by   Simon Larsen, et al.
0

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 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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/20/2021

A Systematic Comparison of Two Refactoring-aware Merging Techniques

Dealing with merge conflicts in version control systems is a challenging...
research
05/10/2023

Do code refactorings influence the merge effort?

In collaborative software development, multiple contributors frequently ...
research
08/31/2021

MergeBERT: Program Merge Conflict Resolution via Neural Transformers

Collaborative software development is an integral part of the modern sof...
research
02/22/2021

Automatic Detection and Resolution of Software Merge Conflicts: Are We There Yet?

Developers create software branches for tentative feature addition and b...
research
03/19/2023

Towards a Dataset of Programming Contest Plagiarism in Java

In this paper, we describe and present the first dataset of source code ...
research
05/09/2023

How is the speed of code review affected by activity, usage and code quality?

This paper investigates how the speed of code review is affected by the ...
research
11/22/2018

Uma técnica para a quantificação do esforço de merge

Developers that use version control systems can work in parallel with ot...

Please sign up or login with your details

Forgot password? Click here to reset