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
- 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) - 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) - Rethinking Classifier Re-Training in Long-Tailed Recognition: A Simple
Logits Retargeting Approach [102.0769560460338]
We develop a simple logits approach (LORT) without the requirement of prior knowledge of the number of samples per class.
Our method achieves state-of-the-art performance on various imbalanced datasets, including CIFAR100-LT, ImageNet-LT, and iNaturalist 2018.
arXiv Detail & Related papers (2024-03-01T03:27:08Z) - 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) - Neural Program Repair with Program Dependence Analysis and Effective
Filter Mechanism [37.70518599085677]
We present a novel neural program repair framework called approach, which adapts the general pre-trained language model for fixing single-line Java bugs.
We make the first attempt to use program slicing to extract contextual information directly related to the given buggy statement as repair ingredients from the corresponding program dependence graph.
We demonstrate the effectiveness of approach on five benchmarks when compared with state-of-the-art baselines.
arXiv Detail & Related papers (2023-05-16T09:43:04Z) - 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) - A Simple Baseline for StyleGAN Inversion [133.5868210969111]
StyleGAN inversion plays an essential role in enabling the pretrained StyleGAN to be used for real facial image editing tasks.
Existing optimization-based methods can produce high quality results, but the optimization often takes a long time.
We present a new feed-forward network for StyleGAN inversion, with significant improvement in terms of efficiency and quality.
arXiv Detail & Related papers (2021-04-15T17:59:49Z) - 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.