Computer Science > Software Engineering
arXiv:2404.11595 (cs)
[Submitted on 17 Apr 2024 (v1), last revised 10 May 2024 (this version, v3)]
Title:A Deep Dive into Large Language Models for Automated Bug Localization and Repair
Authors:Soneya Binta Hossain,Nan Jiang,Qiang Zhou,Xiaopeng Li,Wen-Hao Chiang,Yingjun Lyu,Hoan Nguyen,Omer Tripp
View a PDF of the paper titled A Deep Dive into Large Language Models for Automated Bug Localization and Repair, by Soneya Binta Hossain and 7 other authors
View PDFHTML (experimental)Abstract: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 fixing 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 unit, 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 (SOTA) performance on the CodeXGLUE code refinement benchmark, and exhibits better and comparable performance on several other widely-used APR datasets, including Defects4J.
Subjects: | Software Engineering (cs.SE) |
Cite as: | arXiv:2404.11595 [cs.SE] |
(orarXiv:2404.11595v3 [cs.SE] for this version) | |
https://doi.org/10.48550/arXiv.2404.11595 arXiv-issued DOI via DataCite |
Submission history
From: Soneya Binta Hossain [view email][v1] Wed, 17 Apr 2024 17:48:18 UTC (1,515 KB)
[v2] Sat, 20 Apr 2024 08:30:23 UTC (1,515 KB)
[v3] Fri, 10 May 2024 16:36:52 UTC (1,513 KB)
Full-text links:
Access Paper:
- View PDF
- HTML (experimental)
- TeX Source
- Other Formats
View a PDF of the paper titled A Deep Dive into Large Language Models for Automated Bug Localization and Repair, by Soneya Binta Hossain and 7 other authors
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer(What is the Explorer?)
Connected Papers(What is Connected Papers?)
Litmaps(What is Litmaps?)
scite Smart Citations(What are Smart Citations?)
Code, Data and Media Associated with this Article
alphaXiv(What is alphaXiv?)
CatalyzeX Code Finder for Papers(What is CatalyzeX?)
DagsHub(What is DagsHub?)
Gotit.pub(What is GotitPub?)
Hugging Face(What is Huggingface?)
Papers with Code(What is Papers with Code?)
ScienceCast(What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower(What are Influence Flowers?)
CORE Recommender(What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community?Learn more about arXivLabs.