Lune

ICSE2022Top-tier venue

DEAR: A Novel Deep Learning-based Approach for Automated Program Repair

Yi Li, Shaohua Wang, Tien N. Nguyen

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

29 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • CoCoNuT: combining context-aware neural translation models using ensemble for program repair cites DLFix: context-based code transformation learning for automated program repair
  • Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning cites CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
  • Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning cites DLFix: context-based code transformation learning for automated program repair
  • CURE: Code-Aware Neural Machine Translation for Automatic Program Repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • CURE: Code-Aware Neural Machine Translation for Automatic Program Repair cites 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 cites 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 cites 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 cites DLFix: context-based code transformation learning for automated program repair
  • RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair cites CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
  • RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair cites DLFix: context-based code transformation learning for automated program repair
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers29

  1. Retrieval-Based Prompt Selection for Code-Related Few-Shot LearningNoor Nashid, Mifta Sintaha, Ali MesbahICSE 2023 · 156 citations
  2. Large Language Models for Test-Free Fault LocalizationAidan Z. H. Yang, Claire Le Goues, Ruben Martins, Vincent J. HellendoornICSE 2024 · 98 citations
  3. An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program RepairKai Huang, Xiangxin Meng, Jian Zhang, Yang Liu et al.ASE 2023 · 91 citations
  4. RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program RepairWeishi Wang, Yue Wang, Shafiq Joty, Steven C. H. HoiFSE 2023 · 84 citations
  5. Exploring ChatGPT's Capabilities on Vulnerability ManagementPeiyu Liu, Junming Liu, Lirong Fu, Kangjie Lu et al.USENIX Security 2024 · 52 citations

Builds on4

  1. CoCoNuT: combining context-aware neural translation models using ensemble for program repairThibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li et al.ISSTA 2020 · 325 citations
  2. CURE: Code-Aware Neural Machine Translation for Automatic Program RepairNan Jiang, Thibaud Lutellier, Lin TanICSE 2021 · 267 citations
  3. DLFix: context-based code transformation learning for automated program repairYi Li, Shaohua Wang, Tien N. NguyenICSE 2020 · 201 citations
  4. TreeCaps: Tree-Based Capsule Networks for Source Code ProcessingNghi D. Q. Bui, Yijun Yu, Lingxiao JiangAAAI 2021 · 44 citations

Related papers

  1. Improving Fault Localization and Program Repair with Deep Semantic Features and Transferred KnowledgeXiangxin Meng, Xu Wang, Hongyu Zhang, Hailong Sun et al.ICSE 2022 · 77 citations
  2. Fault localization to detect co-change fixing locationsYi Li, Shaohua Wang, Tien N. NguyenFSE 2022 · 25 citations
  3. KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program RepairNan Jiang, Thibaud Lutellier, Yiling Lou, Lin Tan et al.ICSE 2023 · 55 citations
  4. ITER: Iterative Neural Repair for Multi-Location PatchesHe Ye, Martin MonperrusICSE 2024 · 39 citations
  5. PReMM: LLM-Based Program Repair for Multi-method Bugs via Divide and ConquerLinna Xie, Zhong Li, Yu Pei, Zhongzhen Wen et al.OOPSLA 2025 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines