| 摘要: |
| 软件缺陷定位是软件工程领域的重要问题. 近年来, 基于大语言模型的缺陷定位方法在缺陷定位任务中展现出较好前景. 现有方法仅为大语言模型维护单一决策路径, 导致搜索范围有限, 缺陷定位效果不够理想. 针对此问题, 提出一种基于并行探索的大模型缺陷定位增强方法PRIME. 通过设计缺陷位置的并行探索机制提高大语言模型的搜索范围, 并结合节点重要性评估方法对大语言模型预测的多个候选缺陷位置进行排序, 形成优化后的缺陷定位结果. 通过与其他缺陷定位方法的对比分析以及全面的消融实验和参数影响分析, 验证所提方法可以有效增强大语言模型的缺陷定位性能. PRIME在Top-1指标上较现有方法的提升幅度超过18%, 其在MAP和MRR指标上的性能提升分别可达15%和25%. |
| 关键词: 大语言模型 缺陷定位 节点重要性评估 |
| DOI:10.13328/j.cnki.jos.007592 |
| 分类号:TP311 |
| 基金项目:国家自然科学基金(62402506, 62474196); 国防科技大学研究基金(ZK24-05) |
|
| Boosting LLM-based Fault Localization with Parallel Exploration |
|
QIN Yi-Hao, WANG Shang-Wen, LIN Bo, CHEN Li-Qian, LIU Wan-Wei, MAO Xiao-Guang
|
|
College of Computer Science and Technology, National University of Defense Technology, Changsha 410005, China
|
| Abstract: |
| Software fault localization is a critical issue in software engineering. In recent years, fault localization methods based on large language models (LLMs) have demonstrated a promising prospect in fault localization tasks. However, existing methods maintain only a single decision path for LLMs, which limits the search scope and results in suboptimal fault localization performance. To this end, this study proposes PRIME, an enhanced fault localization method for LLMs based on parallel exploration. The search scope of LLMs is broadened by designing a parallel exploration mechanism for fault locations. Furthermore, multiple candidate fault locations predicted by LLMs are ranked by combining a node importance evaluation method to generate optimized fault localization results. By conducting comparative analysis with other fault localization methods, comprehensive ablation experiments and parameter influence analysis, it is verified that the proposed method can effectively enhance the fault localization performance of LLMs. Compared with the existing methods, PRIME improves the Top-1 metric by over 18%, and its performance improvements in MAP and MRR metrics can reach 15% and 25%, respectively. |
| Key words: large language model (LLM) fault localization node importance evaluation |