MCRepair: Multi-Chunk Program Repair via Patch Optimization with Buggy
Block
- URL: http://arxiv.org/abs/2310.08157v2
- Date: Sat, 14 Oct 2023 04:31:22 GMT
- Title: MCRepair: Multi-Chunk Program Repair via Patch Optimization with Buggy
Block
- Abstract summary: We propose a novel APR technique called multi-code repair (MCRepair), which applies a buggy block, patch optimization, and CodeBERT to target multi-chunk bugs.
In the experiments using Defects4J, MCRepair repaired 65 bugs, including 21 multi-chunk bugs. Moreover, it fixed 18 unique bugs, including eight multi-chunk bugs, and improved 40 to 250 percent performance than the baselines.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Automated program repair (APR) is a technology that identifies and repairs
bugs automatically. However, repairing multi-chunk bugs remains a long-standing
and challenging problem because an APR technique must consider dependencies and
then reduce the large patch space. In addition, little is known about how to
combine individual candidate patches even though multi-chunk bugs require
combinations. Therefore, we propose a novel APR technique called multi-code
repair (MCRepair), which applies a buggy block, patch optimization, and
CodeBERT to target multi-chunk bugs. A buggy block is a novel method that binds
buggy chunks into a multi-buggy chunk and preprocesses the chunk with its buggy
contexts for patch space reduction and dependency problems. Patch optimization
is a novel strategy that effectively combines the generated candidate patches
with patch space reduction. In addition, CodeBERT, a BERT for source code
datasets, is fine-tuned to address the lack of datasets and out-of-vocabulary
problems. We conducted several experiments to evaluate our approach on six
project modules of Defects4J. In the experiments using Defects4J, MCRepair
repaired 65 bugs, including 21 multi-chunk bugs. Moreover, it fixed 18 unique
bugs, including eight multi-chunk bugs, and improved 40 to 250 percent
performance than the baselines.
Related papers
- MultiFixer: A Coordinator-Proposer Based Multi-Agent Framework For Fixing Multi-Hunk Bugs [18.01768265568016]
MultiFixer is a novel Coordinator-Proposer based multi-agent framework for multi-hunk repair.<n>We evaluate MultiFixer on 835 bugs from Defects4J and three vulnerability benchmarks.
arXiv Detail & Related papers (2026-07-29T08:13:12Z) - Beyond Fail-to-Pass: Iterative Hardening of Co-Generated Bug Reproduction Tests and Fixes [55.114939648705395]
Large language models (LLMs) have made automated program repair increasingly practical for real-world bugs.<n>Bug reproduction tests (BRTs) help close this gap by turning a bug report into an executable, bug-specific signal.<n>We propose CoHarden, a co-generation framework that uses the Lax signal as an in-loop convergence criterion.
arXiv Detail & Related papers (2026-07-22T07:30:07Z) - Anchored Self-Play for Code Repair [68.0728003844994]
Code repair is an important capability for language models (LMs)<n>We propose __generator--fixer self-play__, in which a single model is trained with reinforcement learning to generate bugs and fix them.<n>On BugSourceBench, we find that self-play drifts toward difficult but unrealistic bugs.<n>We propose Anchored Self-Play (ASP), which anchors self-play with a small reference set by adding a code-embedding similarity reward for generation and mixing reference bugs into fixer training.
arXiv Detail & Related papers (2026-07-03T17:51:52Z) - A Single Patch Is Not Enough: Deterministic Fusion of Repair Candidates [7.8378908014951705]
We propose PatchFusion, a deterministic atomic evidence fusion approach for candidate patches.<n>On PatchFuseBench, PatchFusion solves 426/500 bugs on SWE-bench Verified and 236/300 on SWE-bench Multilingual.<n>On these complementary multi-source pools, cross-candidate evidence recovers more correct patches than the test-based and LLM-based selectors.
arXiv Detail & Related papers (2026-07-02T01:53:17Z) - QiMeng-PRepair: Precise Code Repair via Edit-Aware Reward Optimization [50.722636027998]
Large Language Models (LLMs) achieve strong program repair performance but often suffer from over-editing.<n>We propose PRepair, a framework that mitigates over-editing and improves repair accuracy.
arXiv Detail & Related papers (2026-04-07T14:56:38Z) - 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) - BugPilot: Complex Bug Generation for Efficient Learning of SWE Skills [59.003563837981886]
High quality bugs are key to training the next generation of language model based software engineering (SWE) agents.<n>We introduce a novel method for synthetic generation of difficult and diverse bugs.
arXiv Detail & Related papers (2025-10-22T17:58:56Z) - RepoDebug: Repository-Level Multi-Task and Multi-Language Debugging Evaluation of Large Language Models [49.83481415540291]
Large Language Models (LLMs) have exhibited significant proficiency in code debug.<n>This paper introduces Repo Debug, a multi-task and multi-language repository-level code debug dataset.<n>We conduct evaluation experiments on 10 LLMs, where Claude 3.5 Sonnect, the best-performing model, still cannot perform well in repository-level debug.
arXiv Detail & Related papers (2025-09-04T10:13:21Z) - Refactoring-Aware Patch Integration Across Structurally Divergent Java Forks [0.0]
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.
arXiv Detail & Related papers (2025-08-08T21:34:05Z) - CrashFixer: A crash resolution agent for the Linux kernel [58.152358195983155]
This work builds upon kGym, which shares a benchmark for system-level Linux kernel bugs and a platform to run experiments on the Linux kernel.
This paper introduces CrashFixer, the first LLM-based software repair agent that is applicable to Linux kernel bugs.
arXiv Detail & Related papers (2025-04-29T04:18:51Z) - MultiMend: Multilingual Program Repair with Context Augmentation and Multi-Hunk Patch Generation [2.7036595757881323]
MultiMend is a learning-based APR approach designed to improve repair performance on multiple programming languages.
It embeds source code lines and applies retrieval-augmented generation to augment the buggy context with relevant lines during patch generation.
We evaluate MultiMend on four benchmarks with four programming languages and compare it with state-of-the-art methods.
arXiv Detail & Related papers (2025-01-27T13:37:43Z) - ThinkRepair: Self-Directed Automated Program Repair [11.598008952093487]
Large language models (LLMs) instructed by prompt engineering have attracted much attention for their powerful ability to address many kinds of tasks including bug-fixing.
We propose a self-directed LLM-based automated program repair, ThinkRepair, with two main phases: collection phase and fixing phase.
Evaluations on two widely studied datasets (Defects4J and QuixBugs) by comparing ThinkRepair with 12 SOTA APRs indicate the priority of ThinkRepair in fixing bugs.
arXiv Detail & Related papers (2024-07-30T15:17:07Z) - KGym: A Platform and Dataset to Benchmark Large Language Models on Linux Kernel Crash Resolution [59.20933707301566]
Large Language Models (LLMs) are consistently improving at increasingly realistic software engineering (SE) tasks.
In real-world software stacks, significant SE effort is spent developing foundational system software like the Linux kernel.
To evaluate if ML models are useful while developing such large-scale systems-level software, we introduce kGym and kBench.
arXiv Detail & Related papers (2024-07-02T21:44:22Z) - A Novel Approach for Automatic Program Repair using Round-Trip
Translation with Large Language Models [50.86686630756207]
Research shows that grammatical mistakes in a sentence can be corrected by translating it to another language and back.
Current generative models for Automatic Program Repair (APR) are pre-trained on source code and fine-tuned for repair.
This paper proposes bypassing the fine-tuning step and using Round-Trip Translation (RTT): translation of code from one programming language to another programming or natural language, and back.
arXiv Detail & Related papers (2024-01-15T22:36:31Z) - Leveraging Print Debugging to Improve Code Generation in Large Language
Models [63.63160583432348]
Large language models (LLMs) have made significant progress in code generation tasks.
But their performance in tackling programming problems with complex data structures and algorithms remains suboptimal.
We propose an in-context learning approach that guides LLMs to debug by using a "print debug" method.
arXiv Detail & Related papers (2024-01-10T18:37:59Z) - DebugBench: Evaluating Debugging Capability of Large Language Models [80.73121177868357]
DebugBench is a benchmark for Large Language Models (LLMs)
It covers four major bug categories and 18 minor types in C++, Java, and Python.
We evaluate two commercial and four open-source models in a zero-shot scenario.
arXiv Detail & Related papers (2024-01-09T15:46:38Z) - RaceFixer -- An Automated Data Race Fixer [0.0]
RaceFixer automates the process of fixing one common type of bug: single-variable atomicity violations.
It tries to combine the patches of multiple bugs for better performance and code readability.
arXiv Detail & Related papers (2024-01-08T20:25:14Z) - Enhancing Redundancy-based Automated Program Repair by Fine-grained
Pattern Mining [18.3896381051331]
We propose a new repair technique named Repatt, which incorporates a two-level pattern mining process for guiding effective patch generation.
We have conducted an experiment on the widely-used Defects4J benchmark and compared Repatt with eight state-of-the-art APR approaches.
arXiv Detail & Related papers (2023-12-26T08:42:32Z) - Automated Bug Generation in the era of Large Language Models [6.0770779409377775]
BugFarm transforms arbitrary code into multiple complex bugs.
A comprehensive evaluation of 435k+ bugs from over 1.9M mutants generated by BUGFARM.
arXiv Detail & Related papers (2023-10-03T20:01:51Z) - 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) - ITER: Iterative Neural Repair for Multi-Location Patches [9.95078657941232]
In this paper, we propose an iterative program repair paradigm called ITER.
ITER iteratively improves partial single-location patches by fixing compilation errors and further refining the previously generated code.
ITER is implemented for Java based on battle-proven deep neural networks and code representation.
arXiv Detail & Related papers (2023-04-24T11:32:02Z) - Using Developer Discussions to Guide Fixing Bugs in Software [51.00904399653609]
We propose using bug report discussions, which are available before the task is performed and are also naturally occurring, avoiding the need for additional information from developers.
We demonstrate that various forms of natural language context derived from such discussions can aid bug-fixing, even leading to improved performance over using commit messages corresponding to the oracle bug-fixing commits.
arXiv Detail & Related papers (2022-11-11T16:37:33Z)
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.