A Software Bug Fixing Approach Based on Knowledge-Enhanced Large Language Models

被引:0
|
作者
Bo, Lili [1 ]
He, Yuting [1 ]
Sun, Xiaobing [1 ]
Ji, Wangjie [1 ]
Wu, Xiaohan [1 ]
机构
[1] Yangzhou Univ, Yangzhou, Jiangsu, Peoples R China
关键词
Bug fixing; Knowledge Graph; Generative AI; Explainable;
D O I
10.1109/QRS62785.2024.00026
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Software Bug Fixing is a time-consuming task in software development and maintenance. Despite the success of Large Language Models (LLMs) using in Automatic Program Repair (APR), they still have the limitations of generating patches with low accuracy and explainability. In this paper, we propose a software bug-fixing approach based on knowledge-enhanced large language models. First, we collect bugs as well as their fix information from bug tracking systems, such as Github and Stack Overflow. Then, we extract bug entities and inter-entity relationships using Named Entity Recognition (NER) to construct a Bug Knowledge Graph (BKG). Finally, we utilize LLMs (e.g., GPT-4) which is enhanced by the knowledge of the similar historical bugs as well as fix information from BKG to generate patches for new bugs. The experimental results show that the our approach can fix 28.52% (85/298) bugs correctly, which is significantly better than the state-of-the-art approaches. Furthermore, the generated patches are explainable and more credible.
引用
收藏
页码:169 / 179
页数:11
相关论文
共 50 条
  • [1] Construction of Legal Knowledge Graph Based on Knowledge-Enhanced Large Language Models
    Li, Jun
    Qian, Lu
    Liu, Peifeng
    Liu, Taoxiong
    INFORMATION, 2024, 15 (11)
  • [2] Metadata Shaping: A Simple Approach for Knowledge-Enhanced Language Models
    Arora, Simran
    Wu, Sen
    Liu, Enci
    Re, Christopher
    FINDINGS OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL 2022), 2022, : 1733 - 1745
  • [3] KEBLM: Knowledge-Enhanced Biomedical Language Models
    Lai, Tuan Manh
    Zhai, ChengXiang
    Ji, Heng
    JOURNAL OF BIOMEDICAL INFORMATICS, 2023, 143
  • [4] Intelligent Bug Fixing with Software Bug Knowledge Graph
    Zhou, Cheng
    ESEC/FSE'18: PROCEEDINGS OF THE 2018 26TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, 2018, : 944 - 947
  • [5] KARGEN: Knowledge-Enhanced Automated Radiology Report Generation Using Large Language Models
    Li, Yingshu
    Wang, Zhanyu
    Liu, Yunyi
    Wang, Lei
    Liu, Lingqiao
    Zhou, Luping
    MEDICAL IMAGE COMPUTING AND COMPUTER ASSISTED INTERVENTION - MICCAI 2024, PT V, 2024, 15005 : 382 - 392
  • [6] VCounselor: a psychological intervention chat agent based on a knowledge-enhanced large language model
    Zhang, Hanzhong
    Qiao, Zhijian
    Wang, Haoyang
    Duan, Bowen
    Yin, Jibin
    MULTIMEDIA SYSTEMS, 2024, 30 (06)
  • [8] Automatic Bug Fixing via Deliberate Problem Solving with Large Language Models
    Weng, Guoyang
    Andrzejak, Artur
    2023 IEEE 34TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING WORKSHOPS, ISSREW, 2023, : 34 - 36
  • [9] Knowledge-Enhanced Language Models Are Not Bias-Proof: Situated Knowledge and Epistemic Injustice in AI
    Kraft, Angelie
    Soulier, Eloise
    PROCEEDINGS OF THE 2024 ACM CONFERENCE ON FAIRNESS, ACCOUNTABILITY, AND TRANSPARENCY, ACM FACCT 2024, 2024, : 1433 - 1445
  • [10] KPLLM-STE: Knowledge-enhanced and prompt-aware large language models for short-text expansion
    Zhong, Hao
    Zhang, Qi
    Li, Weisheng
    Lin, Ronghua
    Tang, Yong
    WORLD WIDE WEB-INTERNET AND WEB INFORMATION SYSTEMS, 2025, 28 (01):