Refactoring-Aware Patch Integration Across Structurally Divergent Java Forks

📅 2025-08-08
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Patch integration frequently fails across long-lived forked Java variants due to structural divergences—especially refactorings such as renaming, moving, and restructuring—that break patch applicability. Method: This paper proposes RePatch, a technique that enables cross-variant patch migration by reverse-aligning refactorings with patch context and replaying them in the target variant to restore semantic correctness. Built upon the RefMerge framework, RePatch integrates semantics-aware refactoring detection and bidirectional mapping to achieve fine-grained contextual alignment while preserving repair intent. Contribution/Results: Evaluated on 478 real-world fix requests, conventional cherry-picking fails in 64.4% of cases; RePatch successfully recovers 52.8% of these failures, substantially enhancing the reusability of defect fixes across structurally heterogeneous, asymmetric variants.

Technology Category

Application Category

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

Research questions and friction points this paper is trying to address.

Integrating bug-fix patches across divergent Java forks
Addressing structural drift and refactoring challenges
Enhancing patch success rate with semantic reasoning
Innovation

Methods, ideas, or system contributions that make the work stand out.

Refactoring-aware patch integration system
Inverts refactorings to realign patch context
Supports asymmetric patch transfer for variants
🔎 Similar Papers
No similar papers found.
D
Daniel Ogenrwot
Department of Computer Science, Howard R. Hughes College of Engineering, University of Nevada Las Vegas, Las Vegas, USA
John Businge
John Businge
University of Nevada, Las Vegas
Software EvolutionSoftware EcosystemsAndroidMining software repositoriesSoftware Analysis