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 条
  • [11] Does the Correctness of Factual Knowledge Matter for Factual Knowledge-Enhanced Pre-trained Language Models?
    Cao, Boxi
    Tang, Qiaoyu
    Lin, Hongyu
    Han, Xianpei
    Sun, Le
    2023 CONFERENCE ON EMPIRICAL METHODS IN NATURAL LANGUAGE PROCESSING, EMNLP 2023, 2023, : 2327 - 2340
  • [12] SPOT: Knowledge-Enhanced Language Representations for Information Extraction
    Li, Jiacheng
    Katsis, Yannis
    Baldwin, Tyler
    Kim, Ho-Cheol
    Bartko, Andrew
    McAuley, Julian
    Hsu, Chun-Nan
    PROCEEDINGS OF THE 31ST ACM INTERNATIONAL CONFERENCE ON INFORMATION AND KNOWLEDGE MANAGEMENT, CIKM 2022, 2022, : 1124 - 1134
  • [13] KnowBug: Enhancing Large language models with bug report knowledge for deep learning framework bug prediction
    Li, Chenglong
    Zheng, Zheng
    Du, Xiaoting
    Ma, Xiangyue
    Wang, Zhengqi
    Li, Xinheng
    KNOWLEDGE-BASED SYSTEMS, 2024, 305
  • [14] Towards knowledge-enhanced process models for semiconductor fabrication
    Rothe, Tom
    Sayyed, Mudassir Ali
    Langer, Jan
    Gottfried, Knut
    Schusterl, Joerg
    Stoll, Martin
    Kuhn, Harald
    2023 IEEE INTERNATIONAL INTERCONNECT TECHNOLOGY CONFERENCE, IITC AND IEEE MATERIALS FOR ADVANCED METALLIZATION CONFERENCE, MAM, IITC/MAM, 2023,
  • [15] A Knowledge-Enhanced Deep Recommendation Framework Incorporating GAN-based Models
    Yang, Deqing
    Guo, Zikai
    Wang, Ziyi
    Jiang, Junyang
    Xiao, Yanghua
    Wang, Wei
    2018 IEEE INTERNATIONAL CONFERENCE ON DATA MINING (ICDM), 2018, : 1368 - 1373
  • [16] Knowledge Graph Based Synthetic Corpus Generation for Knowledge-Enhanced Language Model Pre-training
    Agarwal, Oshin
    Ge, Heming
    Shakeri, Siamak
    Al-Rfou, Rami
    2021 CONFERENCE OF THE NORTH AMERICAN CHAPTER OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS: HUMAN LANGUAGE TECHNOLOGIES (NAACL-HLT 2021), 2021, : 3554 - 3565
  • [17] Knowledge-Enhanced Visual-Language Pretraining for Computational Pathology
    Zhou, Xiao
    Zhang, Xiaoman
    Wu, Chaoyi
    Zhang, Ya
    Xie, Weidi
    Wang, Yanfeng
    COMPUTER VISION - ECCV 2024, PT LII, 2025, 15110 : 345 - 362
  • [18] Learning Knowledge-Enhanced Contextual Language Representations for Domain Natural Language Understanding
    Zhang, Taolin
    Xu, Ruyao
    Wang, Chengyu
    Duan, Zhongjie
    Chen, Cen
    Qiu, Minghui
    Cheng, Dawei
    He, Xiaofeng
    Qian, Weining
    2023 CONFERENCE ON EMPIRICAL METHODS IN NATURAL LANGUAGE PROCESSING (EMNLP 2023), 2023, : 15663 - 15676
  • [19] KIMedQA: towards building knowledge-enhanced medical QA models
    Zafar, Aizan
    Sahoo, Sovan Kumar
    Varshney, Deeksha
    Das, Amitava
    Ekbal, Asif
    JOURNAL OF INTELLIGENT INFORMATION SYSTEMS, 2024, 62 (03) : 833 - 858
  • [20] A Novel Co-evolutionary Approach to Automatic Software Bug Fixing
    Arcuri, Andrea
    Yao, Xin
    2008 IEEE CONGRESS ON EVOLUTIONARY COMPUTATION, VOLS 1-8, 2008, : 162 - 168