LSTM Attention-Driven Similarity Learning for Effective Bug Localization

被引:0
作者
Yang, Geunseok [1 ]
Ji, Jinfeng [2 ]
Kim, Eontae [3 ]
机构
[1] Hankyong Natl Univ, Comp Syst Inst, Dept Comp Appl Math, Anseong 17579, South Korea
[2] Hankyong Natl Univ, Dept Comp Appl Math, Anseong 17579, South Korea
[3] Kyungnam Univ, Dept Comp Engn, Changwon Si 51767, South Korea
来源
APPLIED SCIENCES-BASEL | 2025年 / 15卷 / 03期
关键词
LSTM-Attention mechanism; BM25; algorithm; code similarity learning; bug localization; software evolution;
D O I
10.3390/app15031582
中图分类号
O6 [化学];
学科分类号
0703 ;
摘要
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.
引用
收藏
页数:24
相关论文
共 44 条
[1]   Bug Localization with Combination of Deep Learning and Information Retrieval [J].
An Ngoc Lam ;
Anh Tuan Nguyen ;
Hoan Anh Nguyen ;
Nguyen, Tien N. .
2017 IEEE/ACM 25TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC), 2017, :218-229
[2]   Combining Deep Learning with Information Retrieval to Localize Buggy Files for Bug Reports [J].
An Ngoc Lam ;
Anh Tuan Nguyen ;
Hoan Anh Nguyen ;
Nguyen, Tien N. .
2015 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2015, :476-481
[3]   To CamelCase or Under_score [J].
Binkley, Dave ;
Davis, Marcia ;
Lawrie, Dawn ;
Morrell, Christopher .
ICPC: 2009 IEEE 17TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION, 2009, :158-+
[4]  
bugs.eclipse.org, Eclipse #423718
[5]   An Imbalanced Deep Learning Model for Bug Localization [J].
Bui Thi Mai Anh ;
Nguyen Viet Luyen .
2021 28TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE WORKSHOPS (APSECW 2021), 2021, :32-40
[6]   Using Observed Behavior to Reformulate Queries during Text Retrieval-based Bug Localization [J].
Chaparro, Oscar ;
Florez, Juan Manuel ;
Marcus, Andrian .
2017 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME), 2017, :376-387
[7]   Pathidea: Improving Information Retrieval-Based Bug Localization by Re-Constructing Execution Paths Using Logs [J].
Chen, An Ran ;
Chen, Tse-Hsun ;
Wang, Shaowei .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2022, 48 (08) :2905-2919
[8]   A Similarity Integration Method based Information Retrieval and Word Embedding in Bug Localization [J].
Cheng, Shasha ;
Yan, Xuefeng ;
Khan, Arif Ali .
2020 IEEE 20TH INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY, AND SECURITY (QRS 2020), 2020, :180-187
[9]   A Deep Learning Model for Estimating Story Points [J].
Choetkiertikul, Morakot ;
Hoa Khanh Dam ;
Truyen Tran ;
Trang Pham ;
Ghose, Aditya ;
Menzies, Tim .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2019, 45 (07) :637-656
[10]   How Does Execution Information Help with Information-Retrieval Based Bug Localization? [J].
Dao, Tung ;
Zhang, Lingming ;
Meng, Na .
2017 IEEE/ACM 25TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC), 2017, :241-250