paper-with-me

Papers

Predicting Patch Correctness Based on the Similarity of Failing Test Cases

2021-07-28 · Haoye Tian, Yinghua Li, Weiguo Pian, Abdoul Kader Kaboré, Kui Liu, Andrew Habib, Jacques Klein, Tegawendé F. Bissyande

Towards predicting patch correctness in APR, we propose a simple, but novel hypothesis on how the link between the patch behaviour and failing test specifications can be drawn: similar failing test cases should require similar patches. We then propose BATS, an unsupervised learning-based system to predict patch correctness by checking patch Behaviour Against failing Test Specification. BATS exploits deep representation learning models for code and patches: for a given failing test case, the yielded embedding is used to compute similarity metrics in the search for historical similar test cases in order to identify the associated applied patches, which are then used as a proxy for assessing generated patch correctness. Experimentally, we first validate our hypothesis by assessing whether ground-truth developer patches cluster together in the same way that their associated failing test cases are clustered. Then, after collecting a large dataset of 1278 plausible patches (written by developers or generated by some 32 APR tools), we use BATS to predict correctness: BATS achieves an AUC between 0.557 to 0.718 and a recall between 0.562 and 0.854 in identifying correct patches. Compared against previous work, we demonstrate that our approach outperforms state-of-the-art performance in patch correctness prediction, without the need for large labeled patch datasets in contrast with prior machine learning-based approaches. While BATS is constrained by the availability of similar test cases, we show that it can still be complementary to existing approaches: used in conjunction with a recent approach implementing supervised learning, BATS improves the overall recall in detecting correct patches. We finally show that BATS can be complementary to the state-of-the-art PATCH-SIM dynamic approach of identifying the correct patches for APR tools.

📄 PDF Abstract BibTeX arXiv:2107.13296

Code (1)

HaoyeTianCoder/BATS 공식 구현 tf

Tasks

Representation Learning

Similar Papers 제목 키워드 기반

ContraFix: Skill-Enhanced Contrastive Runtime Analysis for Vulnerability Repair

2026-05-17 · Simiao Liu, Fang Liu, Peiding Wang, Taichuan Li 외 arxiv

As software systems grow increasingly complex, automated vulnerability repair (AVR) remains difficult because the materials available to a repair system are usually failure artifacts rather than repair guidance. Traditio…

Is this Change the Answer to that Problem? Correlating Descriptions of Bug and Code Changes for Evaluating Patch Correctness

2022-08-08 · Haoye Tian, Xunzhu Tang, Andrew Habib, Shangwen Wang 외

In this work, we propose a novel perspective to the problem of patch correctness assessment: a correct patch implements changes that "answer" to a problem posed by buggy behaviour. Concretely, we turn the patch correctne…

Question Answering

Invalidator: Automated Patch Correctness Assessment via Semantic and Syntactic Reasoning

2023-01-03 · Thanh Le-Cong, Duc-Minh Luong, Xuan Bach D. Le, David Lo 외

Automated program repair (APR) faces the challenge of test overfitting, where generated patches pass validation tests but fail to generalize. Existing methods for patch assessment involve generating new tests or manual i…

Language ModellingProgram Repair

StepCache: Step-Level Reuse with Lightweight Verification and Selective Patching for LLM Serving

2026-03-24 · Azam Nouri arxiv

We address LLM serving workloads where repeated requests share a common solution structure but differ in localized constraints, such as output schema, variable names, or numeric constants. Prior caching approaches typica…

Metrics to Quantify Global Consistency in Synthetic Medical Images

2023-08-01 · Daniel Scholz, Benedikt Wiestler, Daniel Rueckert, Martin J. Menten

Image synthesis is increasingly being adopted in medical image processing, for example for data augmentation or inter-modality image translation. In these critical applications, the generated images must fulfill a high s…

Data AugmentationImage Generation