Deep Learning methods are becoming prominent in automated software bug detection; however, they lack the global understanding of the given code. Consequently, their performance tends to degrade, especially when they are applied to large interconnected code bases or complex modular programs. Recently, Large Language Models (LLMs) have proven to be effective at capturing dependencies among multiple interconnected modules in the codebase. This motivated us to propose the Flow-Graph-Driven Multi-Agent Framework (FGDM), which is composed of four agents that operate in a sequential manner. The framework converts the received code to a flow graph, identifies the erroneous segments, and further generates the repaired code. All the employed agents utilize Chain-of-Thought (COT) and Tree-of-Thoughts (TOT) prompts. Additionally, we also integrated with the FAISS vector database to retrieve similar previous bugs and their repairs. We demonstrated the efficacy of the proposed framework over 100 programs from several projects, including Ansible, Black, FastAPI, Keras, Luigi, Matplotlib, Pandas, Scrapy, SpaCy, and Tornado in both C and Python programs. Our experiments demonstrate that the FGDM outperforms the extant approaches and yielded reductions with a mean of 24.33 and 8.37 in Levenshtein distance and similarities of 0.951 and 0.974 in cosine similarity for Python and C, respectively.
Can LLMs Find Bugs in Code? An Evaluation from Beginner Errors to Security Vulnerabilities in Python and C++
1 Dept. of Computer Information Systems, Texas A\&M University - Central Texas, TX, 76549 USA.;2 LSU Center for Computation \& Technology, Louisiana State University, Baton Rouge, LA, 70803 USA.;3 Department of Physics;Astronomy, Louisiana State University, Baton Rouge, LA, 70803 USA.;4 Applied Computer Science (CCS-7), Los Alamos National Laboratory, Los Alamos, NM 87545 USA.
SWE-at-Scale: Scalable Issue Synthesis from Historical Bug Fixes
Shanghai Jiao Tong University(上海交通大学);North China Electric Power University(华北电力大学);Tsinghua University(清华大学);East China Normal University(华东师范大学);Shanghai Innovation Institute(上海创新研究所);Singapore Management University(新加坡管理大学)
Teaching Code LLMs to Reason with Intermediate Formal Specifications
FPT Software AI Center(FPT软件人工智能中心);University of Texas at Dallas(德克萨斯大学达拉斯分校);Hanoi Univ. of Science and Tech.(河内科学技术大学);Texas, USA(得克萨斯州,美国);Hanoi, Vietnam(河内,越南)
Nanjing University(南京大学);Kuaishou Technology(快手科技);Institute of Automation, CAS(中国科学院自动化研究所);University College London(伦敦大学学院);Renmin University of China(中国人民大学);Alibaba Group(阿里巴巴集团)