Lune

EMNLP Findings2022

Detect-Localize-Repair: A Unified Framework for Learning to Debug with CodeT5

Nghi Bui, Yue Wang, Steven C. H. Hoi

Abstract

Automated software debugging is a crucial task for improving the productivity of software developers. Many neural-based techniques have been proven effective for debugging-related tasks such as bug localization and program repair (or bug fixing). However, these techniques often focus only on either one of them or approach them in a stage-wise manner, ignoring the mutual benefits between them. In this work, we propose a novel unified Detect-Localize-Repair framework based on a pretrained programming language model CodeT5 to seamlessly address these tasks, named CodeT5-DLR. Specifically, we propose three objectives to adapt the generic CodeT5 for debugging: a bug detection objective to determine whether a given code snippet is buggy or not, a bug localization objective to identify the buggy lines, and a program repair objective to translate the buggy code to its fixed version. We evaluate it on each of these tasks and their combined setting on two newly collected line-level debugging datasets in Java and Python. Extensive results show that our model significantly outperforms existing baselines from both NLP and software engineering domains.

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.

5 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

  • Can LLMs Implicitly Learn Numeric Parameter Constraints in Data Science APIs? cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation cites Learning and Evaluating Contextual Embedding of Source Code
  • Towards Low-Resource Automatic Program Repair with Meta-Learning and Pretrained Language Models cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • Towards Low-Resource Automatic Program Repair with Meta-Learning and Pretrained Language Models cites CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
  • Towards Low-Resource Automatic Program Repair with Meta-Learning and Pretrained Language Models cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Towards Low-Resource Automatic Program Repair with Meta-Learning and Pretrained Language Models cites GraphCodeBERT: Pre-training Code Representations with Data Flow
  • CodeBERT: A Pre-Trained Model for Programming and Natural Languages cites Learning and Evaluating Contextual Embedding of Source Code
  • Learning and Evaluating Contextual Embedding of Source Code cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • 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 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
  • RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair cites GraphCodeBERT: Pre-training Code Representations with Data Flow
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program RepairWeishi Wang, Yue Wang, Shafiq Joty, Steven C. H. HoiFSE 2023 · 84 citations
  2. Can LLMs Implicitly Learn Numeric Parameter Constraints in Data Science APIs?Yinlin Deng, Chunqiu Steven Xia, Zhezhen Cao, Meiziniu Li et al.NeurIPS 2024 · 4 citations
  3. When is Tree Search Useful for LLM Planning? It Depends on the DiscriminatorZiru Chen, Michael White, Raymond J. Mooney, Ali Payani et al.ACL 2024 · 3 citations
  4. Towards Low-Resource Automatic Program Repair with Meta-Learning and Pretrained Language ModelsWeishi Wang, Yue Wang, Steven C. H. Hoi, Shafiq JotyEMNLP 2023 · 2 citations
  5. CodeMMLU: A Multi-Task Benchmark for Assessing Code Understanding & Reasoning Capabilities of CodeLLMsDung Manh Nguyen, Thang Chau Phan, Nam Le Hai, Tien-Thong Doan et al.ICLR 2025

Builds on16

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan et al.EMNLP Findings 2020 · 2,828 citations
  2. GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng et al.ICLR 2021 · 1,644 citations
  3. CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 1,224 citations
  4. Learning and Evaluating Contextual Embedding of Source CodeAditya Kanade, Petros Maniatis, Gogul Balakrishnan, Kensen ShiICML 2020 · 438 citations
  5. 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

Related papers

  1. CoditT5: Pretraining for Source Code and Natural Language EditingJiyang Zhang, Sheena Panthaplackel, Pengyu Nie, Junyi Jessy Li et al.ASE 2022 · 81 citations
  2. UniDebugger: Hierarchical Multi-Agent Framework for Unified Software DebuggingCheryl Lee, Chunqiu Steven Xia, Longji Yang, Jen-tse Huang et al.EMNLP 2025
  3. Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related TasksAntonio Mastropaolo, Simone Scalabrino, Nathan Cooper, David Nader-Palacio et al.ICSE 2021 · 9 citations
  4. MdEval: Massively Multilingual Code DebuggingShukai Liu, Linzheng Chai, Jian Yang, Jiajun Shi et al.ACL Findings 2026 · 1 citation
  5. GrammarT5: Grammar-Integrated Pretrained Encoder-Decoder Neural Model for CodeQihao Zhu, Qingyuan Liang, Zeyu Sun, Yingfei Xiong et al.ICSE 2024 · 10 citations
Dusk over the sea between two cliffs drawn in fine vertical lines