Facebook pixel tracking

The Science and Information (SAI) Organization publishes open-access peer-reviewed journals in computer science and artificial intelligence.

Contact Info
Website thesai.org
Follow Us
Contact Info
Follow Us
Research Article | Open Access |

Leveraging Large Language Models for Automated Bug Fixing

Author 1: Shatha Abed Alsaedi Author 2: Amin Yousef Noaman Author 3: Ahmed A. A. Gad-Elrab Author 4: Fathy Elbouraey Eassa Author 5: Seif Haridi
International Journal of Advanced Computer Science and Applications (IJACSA) · Vol. 15, No. 12 · Published 2024

DOI: https://doi.org/10.14569/IJACSA.2024.0151247

Abstract

Bug fixing, which is known as Automatic Program Repair (APR), is a significant area of research in the software engineering field. It aims to develop techniques and algorithms to automatically fix bugs and generate fixing patches in the source code. Researchers focus on developing many APR algorithms to enhance software reliability and increase the productivity of developers. In this paper, a novel model for automated bug fixing has been developed leveraging large language models. The proposed model accepts the bug type and the buggy method as inputs and outputs the repaired version of the method. The model can localize the buggy lines, debug the source code, generate the correct patches, and insert them in the correct locations. To evaluate the proposed model, a new dataset which contains 53 Java source code files from four bug classes which are Program Anomaly, GUI, Test-Code and Performance has been presented. The proposed model successfully fixed 49 out of 53 codes using gpt-3.5-turbo and all 53 using gpt-4-0125-preview. The results are notable, with the model achieving accuracies of 92.45% and 100% with gpt-3.5-turbo and gpt-4-0125-preview, respectively. Additionally, the proposed model outperforms several state-of-the-art APR models as it fixes all 40 buggy programs in QuixBugs benchmark dataset.

Keywords

How to Cite this Article

Alsaedi, S. A., Noaman, A. Y., Gad-Elrab, A. A. A., Eassa, F. E., & Haridi, S. (2024). Leveraging Large Language Models for Automated Bug Fixing. International Journal of Advanced Computer Science and Applications, 15(12). https://doi.org/10.14569/IJACSA.2024.0151247

Alsaedi, Shatha Abed, et al.. "Leveraging Large Language Models for Automated Bug Fixing." International Journal of Advanced Computer Science and Applications, vol. 15, no. 12, 2024, https://doi.org/10.14569/IJACSA.2024.0151247.

@article{Alsaedi2024,
  title     = {Leveraging Large Language Models for Automated Bug Fixing},
  journal   = {International Journal of Advanced Computer Science and Applications},
  volume    = {15},
  number    = {12},
  year      = {2024},
  publisher = {The Science and Information Organization},
  author    = {Shatha Abed Alsaedi and Amin Yousef Noaman and Ahmed A. A. Gad-Elrab and Fathy Elbouraey Eassa and Seif Haridi},
  doi       = {10.14569/IJACSA.2024.0151247},
  url       = {https://doi.org/10.14569/IJACSA.2024.0151247}
}

Open Access — licensed under a Creative Commons Attribution 4.0 International License. Unrestricted use, distribution, and reproduction in any medium, even commercially, as long as the original work is properly cited.