Lune

FSE2024顶会

A Deep Dive into Large Language Models for Automated Bug Localization and Repair

Soneya Binta Hossain, Nan Jiang, Qiang Zhou, Xiaopeng Li, Wen-Hao Chiang, Yingjun Lyu, Hoan Anh Nguyen, Omer Tripp

摘要

Large language models (LLMs) have shown impressive effectiveness in various software engineering tasks, including automated program repair (APR). In this study, we take a deep dive into automated bug localization and repair utilizing LLMs. In contrast to many deep learning-based APR methods that assume known bug locations, rely on line-level localization tools, or address bug prediction and fixing in one step, our approach uniquely employs LLMs to predict bug location at the token level and subsequently utilizes them for bug fixing. This methodological separation of bug localization and fixing using different LLMs enables effective integration of diverse contextual information and improved incorporation of inductive biases. We introduce Toggle: Token-Granulated Bug Localization and Repair, a comprehensive program repair framework that integrates a bug localization model, an adjustment model to address tokenizer inconsistencies, and a bug-fixing model. Toggle takes a buggy function as input and generates a complete corrected function. We investigate various styles of prompting to the bug fixing model to identify the most effective prompts that better utilize the inductive bias and significantly outperform others. Toggle achieves the new state-of-the-art performance on the CodeXGLUE code refinement benchmark, and exhibits better and comparable performance on several other widely-used APR datasets, including Defects4J. In the Defects4J benchmark, our approach consistently ranks above other methods, achieving superior results in the Top-10, Top-30, Top-50, and Top-100 metrics. Besides examining Toggle's generalizability to unseen data, evaluating the effectiveness of various prompts, we also investigate the impact of additional contextual information such as buggy lines and code comments on bug localization, and explore the importance of the adjustment model. Our extensive experiments offer valuable insights and answers to critical research questions.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 18 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
  • CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Chasing Shadows: Pitfalls in LLM Security Research 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
  • Chasing Shadows: Pitfalls in LLM Security Research 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • TOGLL: Correct and Strong Test Oracle Generation with LLMS 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Automated Program Repair in the Era of Large Pre-trained Language Models 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • Automated Program Repair in the Era of Large Pre-trained Language Models 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
  • Automated Program Repair in the Era of Large Pre-trained Language Models 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging 引用了 CoCoNuT: combining context-aware neural translation models using ensemble for program repair
  • From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging 引用了 Automated Program Repair in the Era of Large Pre-trained Language Models
  • LeDex: Training LLMs to Better Self-Debug and Explain Code 引用了 CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning
  • LeDex: Training LLMs to Better Self-Debug and Explain Code 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
  • LeDex: Training LLMs to Better Self-Debug and Explain Code 引用了 TOGLL: Correct and Strong Test Oracle Generation with LLMS
  • LeDex: Training LLMs to Better Self-Debug and Explain Code 引用了 Automated Program Repair in the Era of Large Pre-trained Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper18

  1. Chasing Shadows: Pitfalls in LLM Security ResearchJonathan Evertz, Niklas Risse, Nicolai Neuer, Andreas Müller 等NDSS 2026 · 17 次引用
  2. TOGLL: Correct and Strong Test Oracle Generation with LLMSSoneya Binta Hossain, Matthew B. DwyerICSE 2025 · 12 次引用
  3. LeDex: Training LLMs to Better Self-Debug and Explain CodeNan Jiang, Xiaopeng Li, Shiqi Wang, Qiang Zhou 等NeurIPS 2024 · 6 次引用
  4. FastFixer: An Efficient and Effective Approach for Repairing Programming AssignmentsFang Liu, Zhenwei Liu, Qianhui Zhao, Jing Jiang 等ASE 2024 · 4 次引用
  5. From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical DebuggingYuling Shi, Songsong Wang, Chengcheng Wan, Min Wang 等ICSE 2026 · 4 次引用

它引用的 Paper25

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  2. 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 次引用
  3. CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement LearningHung Le, Yue Wang, Akhilesh Deepak Gotmare, Silvio Savarese 等NeurIPS 2022 · 571 次引用
  4. CoCoNuT: combining context-aware neural translation models using ensemble for program repairThibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li 等ISSTA 2020 · 325 次引用
  5. Automated Program Repair in the Era of Large Pre-trained Language ModelsChunqiu Steven Xia, Yuxiang Wei, Lingming ZhangICSE 2023 · 321 次引用

相关 Paper

  1. Aligning the Objective of LLM-Based Program RepairJunjielong Xu, Ying Fu, Shin Hwei Tan, Pinjia HeICSE 2025 · 5 次引用
  2. Automated Repair of Programs from Large Language ModelsZhiyu Fan, Xiang Gao, Martin Mirchev, Abhik Roychoudhury 等ICSE 2023 · 213 次引用
  3. Repair Ingredients Are All You Need: Improving Large Language Model-Based Program Repair via Repair Ingredients SearchJiayi Zhang, Kai Huang, Jian Zhang, Yang Liu 等ICSE 2026
  4. The Plastic Surgery Hypothesis in the Era of Large Language ModelsChunqiu Steven Xia, Yifeng Ding, Lingming ZhangASE 2023 · 26 次引用
  5. ThinkRepair: Self-Directed Automated Program RepairXin Yin, Chao Ni, Shaohua Wang, Zhenhao Li 等ISSTA 2024 · 37 次引用
黄昏的海面,两侧是细线勾勒的悬崖