计算机科学
相似性(几何)
人工智能
图像(数学)
作者
Geunseok Yang,Jinfeng Ji,E. J. Kim
出处
期刊:Applied sciences
[Multidisciplinary Digital Publishing Institute]
日期:2025-02-04
卷期号:15 (3): 1582-1582
摘要
Objective: The complexity of software systems, with their multifaceted functionalities and intricate source code structures, poses significant challenges for developers in identifying and resolving bugs. This study aims to address these challenges by proposing an efficient bug localization method that improves the accuracy and effectiveness of identifying faulty code based on bug reports. Method: We introduce a novel bug localization approach that integrates a Long Short-Term Memory (LSTM) attention mechanism with top-K code similarity learning. The proposed method preprocesses bug reports and source code files, calculates top-K code similarities using the BM25 algorithm, and trains an LSTM-Attention model to predict the most relevant buggy source code files. Results: The model was evaluated on six open-source projects (Tomcat, AspectJ, Birt, Eclipse, JDT, SWT) and demonstrated significant improvements over the baseline method, DNNLoc. Notably, the proposed approach improved accuracy across all projects, with average gains of 18% in prediction accuracy compared to the baseline. Conclusion: This study highlights the efficacy of combining similarity learning with attention mechanisms for bug localization. By streamlining debugging workflows and enhancing predictive accuracy, the proposed method offers a practical solution for improving software quality and reducing development costs.
科研通智能强力驱动
Strongly Powered by AbleSci AI