Refactoring-Aware Patch Integration Across Structurally Divergent Java Forks
- URL: http://arxiv.org/abs/2508.06718v1
- Date: Fri, 08 Aug 2025 21:34:05 GMT
- Title: Refactoring-Aware Patch Integration Across Structurally Divergent Java Forks
- Abstract summary: This paper presents an empirical study of patch integration failures in 14 divergent pair of variants and introduces RePatch.<n>RePatch extends the RefMerge framework, originally designed for symmetric merges, by supporting asymmetric patch transfer.<n>In our evaluation of 478 bug-fix pull requests, Git cherry-pick fails in 64.4% of cases due to structural misalignments, while RePatch successfully integrates 52.8% of the previously failing patches.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: While most forks on platforms like GitHub are short-lived and used for social collaboration, a smaller but impactful subset evolve into long-lived forks, referred to here as variants, that maintain independent development trajectories. Integrating bug-fix patches across such divergent variants poses challenges due to structural drift, including refactorings that rename, relocate, or reorganize code elements and obscure semantic correspondence. This paper presents an empirical study of patch integration failures in 14 divergent pair of variants and introduces RePatch, a refactoring-aware integration system for Java repositories. RePatch extends the RefMerge framework, originally designed for symmetric merges, by supporting asymmetric patch transfer. RePatch inverts refactorings in both the source and target to realign the patch context, applies the patch, and replays the transformations to preserve the intent of the variant. In our evaluation of 478 bug-fix pull requests, Git cherry-pick fails in 64.4% of cases due to structural misalignments, while RePatch successfully integrates 52.8% of the previously failing patches. These results highlight the limitations of syntax-based tools and the need for semantic reasoning in variant-aware patch propagation.
Related papers
- TyPatch: Transforming Patches into Typestate Rules for Kernel Bug Detection [9.241492644741198]
We present TyPatch, which decouples patch-specific defect semantics from analyzer implementation.<n>On Linux v6.16, TyPatch finds 559 distinct bugs, 121 of which have been confirmed by kernel developers.
arXiv Detail & Related papers (2026-09-12T05:34:12Z) - Refine After Generation: Toward Correct and Concise Patches in LLM-based Program Repair [7.380816529814768]
We show that even successful patches are consistently larger and more complex than developer patches.<n>We propose RECAP, a lightweight, plug-and-play adapter that attaches to existing repair frameworks after generation.
arXiv Detail & Related papers (2026-08-13T14:25:50Z) - Independent Patch Verification for Coding Agents with a Bidirectional Reconstruct-and-Verify Framework [49.16055123488827]
coding agents powered by large language models can now generate code patches directly from bug reports.<n>No mechanism independently verifies whether it truly resolves the reported problem.<n>We propose RETRACE, a training-free post-generation verification framework.
arXiv Detail & Related papers (2026-08-09T22:59:13Z) - MOVis: A Visual Analytics Tool for Surfacing Missed Patches Across Software Variants [0.0]
We present MOVis, a tool that visualizes missed opportunity (MO) patches between a source and target variant.<n>It enables developers to quickly locate missed fixes, understand required adaptations, and more efficiently maintain consistency across software variants.
arXiv Detail & Related papers (2026-04-02T00:08:55Z) - PatchGuru: Patch Oracle Inference from Natural Language Artifacts with Large Language Models [16.633386478990037]
We present PatchGuru, the first automated technique that infers executable patch specifications from real-world pull requests (PRs)<n>Given a PR, PatchGuru uses large language models (LLMs) to extract developer intent from NL artifacts and synthesizes patch oracles.<n>PatchGuru iteratively refines inferred oracles by comparing pre- and post-patch behaviors, identifies violations, filters inconsistencies via self-review, and generates bug reports.
arXiv Detail & Related papers (2026-02-05T03:48:17Z) - Outcome-Conditioned Reasoning Distillation for Resolving Software Issues [49.16055123488827]
We present an Outcome-Conditioned Reasoning Distillation(O-CRD) framework that uses resolved in-repository issues with verified patches as supervision.<n>Starting from a historical fix, the method reconstructs a stage-wise repair trace backward from the verified outcome.<n>On SWE-Bench Lite, this approach increases Pass@1 by 10.4% with GPT-4o, 8.6% with DeepSeek-V3, and 10.3% with GPT-5.
arXiv Detail & Related papers (2026-01-30T18:25:39Z) - PatchVSR: Breaking Video Diffusion Resolution Limits with Patch-wise Video Super-Resolution [65.09345929328586]
We propose an innovative approach, called PatchVSR, which integrates a dual-stream adapter for conditional guidance.<n> Experiments demonstrate that our method can synthesize high-fidelity, high-resolution details at the patch level.<n>We can achieve highly competitive 4K VSR based on a 512x512 resolution base model, with extremely high efficiency.
arXiv Detail & Related papers (2025-09-30T09:55:14Z) - ReF Decompile: Relabeling and Function Call Enhanced Decompile [50.86228893636785]
The goal of decompilation is to convert compiled low-level code (e.g., assembly code) back into high-level programming languages.<n>This task supports various reverse engineering applications, such as vulnerability identification, malware analysis, and legacy software migration.
arXiv Detail & Related papers (2025-02-17T12:38:57Z) - PatchFinder: A Two-Phase Approach to Security Patch Tracing for Disclosed Vulnerabilities in Open-Source Software [15.867607171943698]
We propose a two-phase framework with end-to-end correlation learning for better-tracing security patches.
PatchFinder achieves a Recall@10 of 80.63% and a Mean Reciprocal Rank (MRR) of 0.7951.
When applying PatchFinder in practice, we initially identified 533 patch commits and submitted them to the official, 482 of which have been confirmed by CVE Numbering Authorities.
arXiv Detail & Related papers (2024-07-24T07:46:24Z) - Automating Zero-Shot Patch Porting for Hard Forks [12.622409703778604]
We propose a large language model (LLM) based approach to automatically port patches for hard forks on a function-wise basis.
PPatHF can correctly port 131 (42.3%) patches and automate 57% of the manual edits required for the developer to port the patch.
arXiv Detail & Related papers (2024-04-27T17:40:39Z) - A Novel Refactoring and Semantic Aware Abstract Syntax Tree Differencing Tool and a Benchmark for Evaluating the Accuracy of Diff Tools [2.0625936401496237]
Syntax Tree (AST) diff tools were developed to overcome the limitations of line-based diff tools, which are used by the majority of developers.
We propose a novel AST diff tool based on RefactoringMiner that resolves all aforementioned limitations.
Our tool achieved a considerably higher precision and recall, especially for commits, with an execution time that is comparable with incompatible tools.
arXiv Detail & Related papers (2024-03-09T15:32:41Z) - MS-Former: Memory-Supported Transformer for Weakly Supervised Change
Detection with Patch-Level Annotations [50.79913333804232]
We propose a memory-supported transformer (MS-Former) for weakly supervised change detection.
MS-Former consists of a bi-directional attention block (BAB) and a patch-level supervision scheme (PSS)
Experimental results on three benchmark datasets demonstrate the effectiveness of our proposed method in the change detection task.
arXiv Detail & Related papers (2023-11-16T09:57:29Z) - RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic
Program Repair [75.40584530380589]
We propose a novel Retrieval-Augmented Patch Generation framework (RAP-Gen)
RAP-Gen explicitly leveraging relevant fix patterns retrieved from a list of previous bug-fix pairs.
We evaluate RAP-Gen on three benchmarks in two programming languages, including the TFix benchmark in JavaScript, and Code Refinement and Defects4J benchmarks in Java.
arXiv Detail & Related papers (2023-09-12T08:52:56Z) - 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) - DPT: Deformable Patch-based Transformer for Visual Recognition [57.548916081146814]
We propose a new Deformable Patch (DePatch) module which learns to adaptively split the images into patches with different positions and scales in a data-driven way.
The DePatch module can work as a plug-and-play module, which can easily be incorporated into different transformers to achieve an end-to-end training.
arXiv Detail & Related papers (2021-07-30T07:33:17Z) - Anti-aliasing Semantic Reconstruction for Few-Shot Semantic Segmentation [66.85202434812942]
We reformulate few-shot segmentation as a semantic reconstruction problem.
We convert base class features into a series of basis vectors which span a class-level semantic space for novel class reconstruction.
Our proposed approach, referred to as anti-aliasing semantic reconstruction (ASR), provides a systematic yet interpretable solution for few-shot learning problems.
arXiv Detail & Related papers (2021-06-01T02:17:36Z)
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.