Accelerating Patch Validation for Program Repair with Interception-Based
Execution Scheduling
- URL: http://arxiv.org/abs/2305.03955v2
- Date: Fri, 26 Jan 2024 14:35:12 GMT
- Title: Accelerating Patch Validation for Program Repair with Interception-Based
Execution Scheduling
- Authors: Yuan-An Xiao, Chenyang Yang, Bo Wang, Yingfei Xiong
- Abstract summary: We investigate existing mutation testing techniques and identify five classes of acceleration techniques that are suitable for general-purpose patch validation.
We propose two novel approaches: execution scheduling, which detects the equivalence between patches online, and interception-based instrumentation, which intercepts the changes of patches to the system state.
Our large-scale evaluation with four APR approaches shows that ExpressAPR accelerates patch validation by 137.1x over plainvalidation or 8.8x over the state-of-the-art approach.
- Score: 15.592392495402809
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Long patch validation time is a limiting factor for automated program repair
(APR). Though the duality between patch validation and mutation testing is
recognized, so far there exists no study of systematically adapting mutation
testing techniques to general-purpose patch validation. To address this gap, we
investigate existing mutation testing techniques and identify five classes of
acceleration techniques that are suitable for general-purpose patch validation.
Among them, mutant schemata and mutant deduplication have not been adapted to
general-purpose patch validation due to the arbitrary changes that third-party
APR approaches may introduce. This presents two problems for adaption: 1) the
difficulty of implementing the static equivalence analysis required by the
state-of-the-art mutant deduplication approach; 2) the difficulty of capturing
the changes of patches to the system state at runtime. To overcome these
problems, we propose two novel approaches: 1) execution scheduling, which
detects the equivalence between patches online, avoiding the static equivalence
analysis and its imprecision; 2) interception-based instrumentation, which
intercepts the changes of patches to the system state, avoiding a full
interpreter and its overhead. Based on the contributions above, we implement
ExpressAPR, a general-purpose patch validator for Java that integrates all
recognized classes of techniques suitable for patch validation. Our large-scale
evaluation with four APR approaches shows that ExpressAPR accelerates patch
validation by 137.1x over plainvalidation or 8.8x over the state-of-the-art
approach, making patch validation no longer the time bottleneck of APR. Patch
validation time for a single bug can be reduced to within a few minutes on
mainstream CPUs.
Related papers
- 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) - CompVPD: Iteratively Identifying Vulnerability Patches Based on Human Validation Results with a Precise Context [16.69634193308039]
It is challenging to apply security patches in open source software timely because notifications of patches are often incomplete and delayed.
We propose a multi-granularity slicing algorithm and an adaptive-expanding algorithm to accurately identify code related to the patches.
We empirically compare CompVPD with four state-of-the-art/practice (SOTA) approaches in identifying vulnerability patches.
arXiv Detail & Related papers (2023-10-04T02:08:18Z) - 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) - Better Practices for Domain Adaptation [62.70267990659201]
Domain adaptation (DA) aims to provide frameworks for adapting models to deployment data without using labels.
Unclear validation protocol for DA has led to bad practices in the literature.
We show challenges across all three branches of domain adaptation methodology.
arXiv Detail & Related papers (2023-09-07T17:44:18Z) - Patch Space Exploration using Static Analysis Feedback [8.13782364161157]
We show how to automatically repair memory safety issues, by leveraging static analysis to guide repair.
Our proposed approach learns what a desirable patch is by inspecting how close a patch is to fixing the bug.
We make repair scalable by creating classes of equivalent patches according to the effect they have on the symbolic heap, and then invoking the validation oracle only once per class of patch equivalence.
arXiv Detail & Related papers (2023-08-01T05:22:10Z) - Semi-DETR: Semi-Supervised Object Detection with Detection Transformers [105.45018934087076]
We analyze the DETR-based framework on semi-supervised object detection (SSOD)
We present Semi-DETR, the first transformer-based end-to-end semi-supervised object detector.
Our method outperforms all state-of-the-art methods by clear margins.
arXiv Detail & Related papers (2023-07-16T16:32:14Z) - On Pitfalls of Test-Time Adaptation [82.8392232222119]
Test-Time Adaptation (TTA) has emerged as a promising approach for tackling the robustness challenge under distribution shifts.
We present TTAB, a test-time adaptation benchmark that encompasses ten state-of-the-art algorithms, a diverse array of distribution shifts, and two evaluation protocols.
arXiv Detail & Related papers (2023-06-06T09:35:29Z) - PatchZero: Zero-Shot Automatic Patch Correctness Assessment [13.19425284402493]
We propose toolname, the patch correctness assessment by adopting a large language model for code.
toolname prioritizes labeled patches from existing APR tools that exhibit semantic similarity to those generated by new APR tools.
Our experimental results showed that toolname can achieve an accuracy of 84.4% and an F1-score of 86.5% on average.
arXiv Detail & Related papers (2023-03-01T03:12:11Z) - Segment and Complete: Defending Object Detectors against Adversarial
Patch Attacks with Robust Patch Detection [142.24869736769432]
Adversarial patch attacks pose a serious threat to state-of-the-art object detectors.
We propose Segment and Complete defense (SAC), a framework for defending object detectors against patch attacks.
We show SAC can significantly reduce the targeted attack success rate of physical patch attacks.
arXiv Detail & Related papers (2021-12-08T19:18:48Z) - PatchCensor: Patch Robustness Certification for Transformers via
Exhaustive Testing [7.88628640954152]
Vision Transformer (ViT) is known to be highly nonlinear like other classical neural networks and could be easily fooled by both natural and adversarial patch perturbations.
This limitation could pose a threat to the deployment of ViT in the real industrial environment, especially in safety-critical scenarios.
We propose PatchCensor, aiming to certify the patch robustness of ViT by applying exhaustive testing.
arXiv Detail & Related papers (2021-11-19T23:45:23Z) - Checking Patch Behaviour against Test Specification [4.723400023753107]
We propose a hypothesis on how the link between the patch behaviour and failing test specifications can be drawn.
We then propose BATS, an unsupervised learning-based system to predict patch correctness.
arXiv Detail & Related papers (2021-07-28T11:39:06Z)
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.