On the Correctness of Software Merge
- URL: http://arxiv.org/abs/2607.07987v1
- Date: Wed, 08 Jul 2026 23:27:47 GMT
- Title: On the Correctness of Software Merge
- Abstract summary: We present a new structural merge tool in comparison with existing tools based on the syntactic criteria we propose for evaluating the merge results.<n>Being parsable means that the result is syntactically valid according to the grammar of the programming language.<n>Being universal means that the result incorporates all and only the edit operations occurring in each branch while ensuring that edits common to both branches are applied only once.
- Score: 0.0
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Three-way merge tools play crucial roles in modern software development, where a developer forks a branch to make local modifications and requests it to be merged into the main branch via a "pull request." Despite its importance, the task has traditionally been defined in an intuitive manner, and the results of merge tools are often accepted without scrutiny. In this paper, we present a new structural merge tool in comparison with existing tools based on the syntactic criteria we propose for evaluating the merge results. We require the merge result to be both parsable and universal. Being parsable means that the result is syntactically valid according to the grammar of the programming language. Being universal means that the result incorporates all and only the edit operations occurring in each branch while ensuring that edits common to both branches are applied only once. This requirement can be precisely defined using the notion of pushouts in category theory. In a large-scale experiment involving 43,774 file merge scenarios from 76 open-source Java projects, we found a number of incorrect results reported by existing tools such as the Git companion merge tool, whereas our tool reports none. We further compared d3j's results with 2,582 developer-resolved merges and with 2,459 merge scenarios involving 21 refactoring types. These experiments revealed both the strengths and current limitations of structural merge, and underscore the importance of clear correctness criteria. We expect that the proposed criterion will provide a foundation for developing more reliable and principled merge tools.
Related papers
- On the Influence of Refactoring Types on Merge Effort [70.15634443127651]
We analyze 64 open-source Java projects and applied association rule mining to measure the strength of associations between specific types and merge effort.<n>Our results show that types relate to merge effort with varying strength.<n>Co-occurrences across parallel branches is associated with higher merge effort.
arXiv Detail & Related papers (2026-08-15T19:28:01Z) - MergirafSemi: A Language-Agnostic Semistructured Merge Tool [24.349177948300035]
Developers frequently face merge conflicts when integrating concurrent changes.<n>Most merge tools rely on unstructured, line-based comparisons, often producing spurious conflicts and missing actual conflicts.<n>We propose MergirafSemi, a language-agnostic semistructured merge tool that captures structural information without requiring full structural modeling.
arXiv Detail & Related papers (2026-08-11T18:52:13Z) - A Universal Textual Merge Strategy Based on Tokens for Version Control Systems [0.0]
Merging is a core operation in version control systems such as Git, but traditional line-based algorithms often yield spurious conflicts.<n>We present Summer, a novel token-based merge algorithm independent of document formats.
arXiv Detail & Related papers (2026-04-15T12:48:01Z) - A Large Scale Empirical Analysis on the Adherence Gap between Standards and Tools in SBOM [54.38424417079265]
A Software Bill of Materials (SBOM) is a machine-readable artifact that organizes software information.<n>Following standards, organizations have developed tools for generating and utilizing SBOMs.<n>This paper presents the first large-scale, two-stage empirical analysis of the adherence gap, using our automated evaluation framework, SAP.
arXiv Detail & Related papers (2026-01-09T08:26:05Z) - ToolLibGen: Scalable Automatic Tool Creation and Aggregation for LLM Reasoning [80.10274552177096]
Large Language Models (LLMs) equipped with external tools have demonstrated enhanced performance on complex reasoning tasks.<n>The widespread adoption of this tool-augmented reasoning is hindered by the scarcity of domain-specific tools.<n>We propose a systematic approach to automatically an unstructured collection of tools into a structured tool library.
arXiv Detail & Related papers (2025-10-09T04:11:16Z) - LastMerge: A language-agnostic structured tool for code integration [1.201626478128059]
We propose LastMerge, a generic structured merge tool that can be configured through a thin interface.<n>We run an experiment with four structured merge tools: two Java specific tools, jDime and Spork, and their generic counterparts, respectively LastMerge and Mergiraf.<n>Our results show no evidence that generic structured merge significantly impacts merge accuracy.
arXiv Detail & Related papers (2025-07-25T21:46:10Z) - LLM-Driven Collaborative Model for Untangling Commits via Explicit and Implicit Dependency Reasoning [15.20947984949809]
We propose ColaUntangle, a new collaborative consultation framework for commit untangling.<n>ColaUntangle integrates Large Language Model (LLM)-driven agents in a multi-agent architecture.<n>We evaluate ColaUntangle on two widely-used datasets (1,612 C# and 14k Java tangled commits)
arXiv Detail & Related papers (2025-07-22T09:42:13Z) - CORG: Generating Answers from Complex, Interrelated Contexts [57.213304718157985]
In a real-world corpus, knowledge frequently recurs across documents but often contains inconsistencies due to ambiguous naming, outdated information, or errors.<n>Previous research has shown that language models struggle with these complexities, typically focusing on single factors in isolation.<n>We introduce Context Organizer (CORG), a framework that organizes multiple contexts into independently processed groups.
arXiv Detail & Related papers (2025-04-25T02:40:48Z) - When Disagreements Elicit Robustness: Investigating Self-Repair Capabilities under LLM Multi-Agent Disagreements [56.29265568399648]
We argue that disagreements prevent premature consensus and expand the explored solution space.<n>Disagreements on task-critical steps can derail collaboration depending on the topology of solution paths.
arXiv Detail & Related papers (2025-02-21T02:24:43Z) - EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking [58.15568681219339]
We introduce EquiBench, a new benchmark for evaluating large language models (LLMs)<n>This task directly tests a model's ability to reason about program semantics.<n>We evaluate 19 state-of-the-art LLMs and find that in the most challenging categories, the best accuracies are 63.8% and 76.2%, only modestly above the 50% random baseline.
arXiv Detail & Related papers (2025-02-18T02:54:25Z) - Evaluation of Version Control Merge Tools [3.1969855247377836]
A version control system, such as Git, requires a way to integrate changes from different developers or branches.
A merge tool either outputs a clean integration of the changes, or it outputs a conflict for manual resolution.
New merge tools have been proposed, but they have not yet been evaluated against one another.
arXiv Detail & Related papers (2024-10-13T17:35:14Z) - Do code refactorings influence the merge effort? [80.1936417993664]
Multiple contributors frequently change the source code in parallel to implement new features, fix bugs, existing code, and make other changes.
These simultaneous changes need to be merged into the same version of the source code.
Studies show that 10 to 20 percent of all merge attempts result in conflicts, which require the manual developer's intervention to complete the process.
arXiv Detail & Related papers (2023-05-10T13:24:59Z) - MergeBERT: Program Merge Conflict Resolution via Neural Transformers [11.460182185916704]
Merge conflicts can stall pull requests and continuous integration pipelines for hours to several days.
We introduce MergeBERT, a novel neural program merge framework based on the token-level three-way differencing and a transformer model.
Our model achieves 64--69% precision of merge resolution synthesis, yielding nearly a 2x performance improvement over existing structured and neural program merge tools.
arXiv Detail & Related papers (2021-08-31T21:37:53Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.