A Deep Dive into Large Language Models for Automated Bug Localization and Repair
Proceedings of the ACM on Software Engineering · 12.07.2024 · 1 (FSE) · 1471-1493
DOI: 10.1145/3660773 ↗Kurz gefasst
Fachartikel in der Zeitschrift Proceedings of the ACM on Software Engineering, online erschienen am 12.07.2024. Verfasst von Soneya Binta Hossain und 7 weiteren Autor:innen. Die Arbeit wurde bisher 99-mal zitiert (Crossref) und nennt 47 Literaturangaben.
Abstract (Originalsprache)
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: To ken- G ranulated Bug L ocalization and R e pair , 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.
Zitieren
APA
Hossain, S. B., Jiang, N., Zhou, Q., Li, X., Chiang, W., Lyu, Y., Nguyen, H., & Tripp, O. (2024). A Deep Dive into Large Language Models for Automated Bug Localization and Repair. Proceedings of the ACM on Software Engineering, 1(FSE), 1471-1493. https://doi.org/10.1145/3660773
Vancouver
Hossain SB, Jiang N, Zhou Q, Li X, Chiang W, Lyu Y, et al. A Deep Dive into Large Language Models for Automated Bug Localization and Repair. Proceedings of the ACM on Software Engineering. 2024;1(FSE):1471-1493. doi:10.1145/3660773
BibTeX
@article{Hossain2024,
author = {Hossain, Soneya Binta and Jiang, Nan and Zhou, Qiang and Li, Xiaopeng and Chiang, Wen-Hao and Lyu, Yingjun and Nguyen, Hoan and Tripp, Omer},
title = {A Deep Dive into Large Language Models for Automated Bug Localization and Repair},
journal = {Proceedings of the ACM on Software Engineering},
year = {2024},
volume = {1},
number = {FSE},
pages = {1471--1493},
doi = {10.1145/3660773}
}
EUVIMED