DEAR: A Novel Deep Learning-based Approach for Automated Program Repair
Yi Li, Shaohua Wang, Tien N. Nguyen
摘要
The existing deep learning (DL)-based automated program repair (APR) models are limited in fixing general software defects. We present DEAR, a DL-based approach that supports fixing for the general bugs that require dependent changes at once to one or multiple consecutive statements in one or multiple hunks of code. We first design a novel fault localization (FL) technique for multi-hunk, multi-statement fixes that combines traditional spectrum-based (SB) FL with deep learning and data-flow analysis. It takes the buggy statements returned by the SBFL model, detects the buggy hunks to be fixed at once, and expands a buggy statement 𝑠 in a hunk to include other suspicious statements around 𝑠. We design a two-tier, tree-based LSTM model that incorporates cycle training and uses a divide-and-conquer strategy to learn proper code transformations for fixing multiple statements in the suitable fixing context consisting of surrounding subtrees. We conducted several experiments to evaluate DEAR on three datasets: Defects4J (395 bugs), BigFix (+26k bugs), and CPatMiner (+44k bugs). On Defects4J dataset, DEAR outperforms the baselines from 42%-683% in terms of the number of auto-fixed bugs with only the top-1 patches. On BigFix dataset, it fixes 31-145 more bugs than existing DL-based APR models with the top-1 patches. On CPatMiner dataset, among 667 fixed bugs, there are 169 (25.3%) multi-hunk/multi-statement bugs. DEAR fixes 71 and 164 more bugs, including 52 and 61 more multi-hunk/multistatement bugs, than the state-of-the-art, DL-based APR models.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 29 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- CoCoNuT: combining context-aware neural translation models using ensemble for program repair 引用了 DLFix: context-based code transformation learning for automated program repair
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning 引用了 CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning 引用了 DLFix: context-based code transformation learning for automated program repair
- CURE: Code-Aware Neural Machine Translation for Automatic Program Repair 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- CURE: Code-Aware Neural Machine Translation for Automatic Program Repair 引用了 DLFix: context-based code transformation learning for automated program repair
- An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program Repair 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program Repair 引用了 CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program Repair 引用了 DLFix: context-based code transformation learning for automated program repair
- RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair 引用了 CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair 引用了 DLFix: context-based code transformation learning for automated program repair
引用它的顶会 Paper29
- Retrieval-Based Prompt Selection for Code-Related Few-Shot LearningNoor Nashid, Mifta Sintaha, Ali MesbahICSE 2023 · 156 次引用
- Large Language Models for Test-Free Fault LocalizationAidan Z. H. Yang, Claire Le Goues, Ruben Martins, Vincent J. HellendoornICSE 2024 · 98 次引用
- An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program RepairKai Huang, Xiangxin Meng, Jian Zhang, Yang Liu 等ASE 2023 · 91 次引用
- RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program RepairWeishi Wang, Yue Wang, Shafiq Joty, Steven C. H. HoiFSE 2023 · 84 次引用
- Exploring ChatGPT's Capabilities on Vulnerability ManagementPeiyu Liu, Junming Liu, Lirong Fu, Kangjie Lu 等USENIX Security 2024 · 52 次引用
它引用的 Paper4
- CoCoNuT: combining context-aware neural translation models using ensemble for program repairThibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li 等ISSTA 2020 · 325 次引用
- CURE: Code-Aware Neural Machine Translation for Automatic Program RepairNan Jiang, Thibaud Lutellier, Lin TanICSE 2021 · 267 次引用
- DLFix: context-based code transformation learning for automated program repairYi Li, Shaohua Wang, Tien N. NguyenICSE 2020 · 201 次引用
- TreeCaps: Tree-Based Capsule Networks for Source Code ProcessingNghi D. Q. Bui, Yijun Yu, Lingxiao JiangAAAI 2021 · 44 次引用
相关 Paper
- Improving Fault Localization and Program Repair with Deep Semantic Features and Transferred KnowledgeXiangxin Meng, Xu Wang, Hongyu Zhang, Hailong Sun 等ICSE 2022 · 77 次引用
- Fault localization to detect co-change fixing locationsYi Li, Shaohua Wang, Tien N. NguyenFSE 2022 · 25 次引用
- KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program RepairNan Jiang, Thibaud Lutellier, Yiling Lou, Lin Tan 等ICSE 2023 · 55 次引用
- ITER: Iterative Neural Repair for Multi-Location PatchesHe Ye, Martin MonperrusICSE 2024 · 39 次引用
- PReMM: LLM-Based Program Repair for Multi-method Bugs via Divide and ConquerLinna Xie, Zhong Li, Yu Pei, Zhongzhen Wen 等OOPSLA 2025 · 1 次引用
