Enhancing Redundancy-based Automated Program Repair by Fine-grained
Pattern Mining
- URL: http://arxiv.org/abs/2312.15955v1
- Date: Tue, 26 Dec 2023 08:42:32 GMT
- Title: Enhancing Redundancy-based Automated Program Repair by Fine-grained
Pattern Mining
- Authors: Jiajun Jiang, Zijie Zhao, Zhirui Ye, Bo Wang, Hongyu Zhang, Junjie
Chen
- Abstract summary: 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.
- Score: 18.3896381051331
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Redundancy-based automated program repair (APR), which generates patches by
referencing existing source code, has gained much attention since they are
effective in repairing real-world bugs with good interpretability. However,
since existing approaches either demand the existence of multi-line similar
code or randomly reference existing code, they can only repair a small number
of bugs with many incorrect patches, hindering their wide application in
practice. In this work, we aim to improve the effectiveness of redundancy-based
APR by exploring more effective source code reuse methods for improving the
number of correct patches and reducing incorrect patches. Specifically, we have
proposed a new repair technique named Repatt, which incorporates a two-level
pattern mining process for guiding effective patch generation (i.e., token and
expression levels). We have conducted an extensive experiment on the
widely-used Defects4J benchmark and compared Repatt with eight state-of-the-art
APR approaches. The results show that our approach complements existing
approaches by repairing {15} unique bugs compared with the latest deep
learning-based methods and {19} unique bugs compared with traditional repair
methods when providing the perfect fault localization. In addition, when the
perfect fault localization is unknown in real practice, Repatt significantly
outperforms the baseline approaches by achieving much higher patch precision,
i.e., {83.8\%}. Moreover, we further proposed an effective patch ranking
strategy for combining the strength of Repatt and the baseline methods. The
result shows that it repairs 124 bugs when only considering the Top-1 patches
and improves the best-performing repair method by repairing 39 more bugs. The
results demonstrate the effectiveness of our approach for practical use.
Related papers
- FastFixer: An Efficient and Effective Approach for Repairing Programming Assignments [21.848112758958543]
We propose FastFixer, an efficient and effective approach for programming assignment repair.
We first propose a novel repair-oriented fine-tuning strategy, aiming to enhance the LLM's attention towards learning how to generate the necessary patch and its associated context.
Considering the repair efficiency, FastFixer achieves a remarkable inference speedup of 16.67 times compared to the autoregressive decoding algorithm.
arXiv Detail & Related papers (2024-10-11T10:17:02Z) - Improving LLM Reasoning through Scaling Inference Computation with Collaborative Verification [52.095460362197336]
Large language models (LLMs) struggle with consistent and accurate reasoning.
LLMs are trained primarily on correct solutions, reducing their ability to detect and learn from errors.
We propose a novel collaborative method integrating Chain-of-Thought (CoT) and Program-of-Thought (PoT) solutions for verification.
arXiv Detail & Related papers (2024-10-05T05:21:48Z) - On The Effectiveness of Dynamic Reduction Techniques in Automated Program Repair [1.7767466724342067]
We describe a program repair framework that effectively handles large-scale buggy programs of industrial complexity.
The framework exploits program reduction in the form of program slicing to eliminate parts of the code irrelevant to the bug being repaired.
Our empirical results on the widely used Defects4J dataset reveal that a substantial improvement in performance can be obtained without any degradation in repair quality.
arXiv Detail & Related papers (2024-06-23T21:35:07Z) - Investigating the Transferability of Code Repair for Low-Resource Programming Languages [57.62712191540067]
Large language models (LLMs) have shown remarkable performance on code generation tasks.
Recent works augment the code repair process by integrating modern techniques such as chain-of-thought reasoning or distillation.
We investigate the benefits of distilling code repair for both high and low resource languages.
arXiv Detail & Related papers (2024-06-21T05:05:39Z) - Hybrid Automated Program Repair by Combining Large Language Models and Program Analysis [12.7034916462208]
Automated Program Repair (APR) has garnered significant attention due to its potential to streamline the bug repair process for human developers.
This paper introduces an innovative APR approach called GIANTREPAIR.
Based on this insight, GIANTREPAIR first constructs patch skeletons from LLM-generated patches to confine the patch space, and then generates high-quality patches tailored to specific programs.
arXiv Detail & Related papers (2024-06-03T05:05:12Z) - Optimal Baseline Corrections for Off-Policy Contextual Bandits [61.740094604552475]
We aim to learn decision policies that optimize an unbiased offline estimate of an online reward metric.
We propose a single framework built on their equivalence in learning scenarios.
Our framework enables us to characterize the variance-optimal unbiased estimator and provide a closed-form solution for it.
arXiv Detail & Related papers (2024-05-09T12:52:22Z) - 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) - Efficient Few-Shot Object Detection via Knowledge Inheritance [62.36414544915032]
Few-shot object detection (FSOD) aims at learning a generic detector that can adapt to unseen tasks with scarce training samples.
We present an efficient pretrain-transfer framework (PTF) baseline with no computational increment.
We also propose an adaptive length re-scaling (ALR) strategy to alleviate the vector length inconsistency between the predicted novel weights and the pretrained base weights.
arXiv Detail & Related papers (2022-03-23T06:24:31Z) - Adversarial Patch Generation for Automated Program Repair [0.0]
NEVERMORE is a novel learning-based mechanism inspired by the adversarial nature of bugs and fixes.
NEVERMORE is built upon the Generative Adrial Networks architecture and trained on historical bug fixes to generate repairs that closely mimic human-produced fixes.
Our empirical evaluation on 500 real-world bugs demonstrates the effectiveness of NEVERMORE in bug-fixing, generating repairs that match human fixes for 21.2% of the examined bugs.
arXiv Detail & Related papers (2020-12-21T00:34:29Z) - Structured and Localized Image Restoration [141.75042935077465]
We present a novel approach to image restoration that leverages ideas from localized structured prediction and non-linear multi-task learning.
We derive the corresponding algorithms for energies based on the mean-squared and Euclidean norm errors.
arXiv Detail & Related papers (2020-06-16T15:43:12Z)
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.