Work

LSTM Attention-Driven Similarity Learning for Effective Bug Localization

Year: 2025
Type: article
Abstract: 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.
Authors: Geunseok Yang, Jinfeng Ji, Eontae Kim
Language: English
Open Access status: gold
Estimated APC paid: $2,896
OpenAlex ID: W4407149482
FWCI: 1.089
Cites: 41
Cited by: 1
Related to: 10