Statement Level Software Bug Localization Based on Historical Bug Information Retrieval

被引:1
作者
Yue, Lei [1 ]
Cui, Zhan-Qi [1 ]
Chen, Xiang [2 ]
Wang, Rong-Cun [3 ]
Li, Li [1 ]
机构
[1] School of Computer Science, Beijing Information Science and Technology University, Beijing
[2] School of Information Science and Technology, Nantong University, Nantong
[3] School of Computer Science and Technology, China University of Mining and Technology, Xuzhou
来源
Ruan Jian Xue Bao/Journal of Software | 2024年 / 35卷 / 10期
关键词
bug localization; bug report; information retrieval; software debugging;
D O I
10.13328/j.cnki.jos.006980
中图分类号
学科分类号
摘要
A large number of bug reports are generated during software development and maintenance, which can help developers to locate bugs. Information retrieval based bug localization (IRBL) analyzes the similarity of bug reports and source code files to locate bugs, achieving high accuracy at the file and function levels. However, a lot of labor and time costs are consumed to find bugs from suspicious files and function fragments due to the coarse location granularity of IRBL. This study proposes a statement level software bug localization method based on historical bug information retrieval, STMTLocator. Firstly, it retrieves historical bug reports which are similar to the bug report of the program under test and extracts the bug statements from the historical bug reports. Then, it retrieves the suspicious files according to the text similarity between the source code files and the bug report of the program under test, and extracts the suspicious statements from the suspicious files. Finally, it calculates the similarity between the suspicious statements and the historical bug statements, and arranges them in descending order to localize bug statements. To evaluate the bug localization performance of STMTLocator, comparative experiments are conducted on the Defects4J and JIRA dataset with Top@N, MRR, and other evaluation metrics. The experimental results show that STMTLocator is nearly four times than the static bug localization method BugLocator in terms of MRR and locates 7 more bug statements for Top@1. The average time used by STMTLocator to locate a bug version is reduced by 98.37% and 63.41% than dynamic bug localization methods Metallaxis and DStar, and STMTLocator has a significant advantage of not requiring the construction and execution of test cases. © 2024 Chinese Academy of Sciences. All rights reserved.
引用
收藏
页码:4642 / 4661
页数:19
相关论文
共 44 条
  • [41] Kochhar PS, Xia X, Lo D, Li SP., Practitioners' expectations on automated fault localization, Proc. of the 25th Int’l Symp. on Software Testing and Analysis, pp. 165-176, (2016)
  • [42] Catolino G, Palomba F, Zaidman A, Ferrucci F., Not all bugs are the same: Understanding, characterizing, and classifying bug types, Journal of Systems and Software, 152, pp. 165-181, (2019)
  • [43] Jiang YJ, Liu H, Luo XQ, Zhu ZH, Chi XY, Niu N, Zhang YX, Hu YM, Bian P, Zhang L., BugBuilder: An automated approach to building bug repository, IEEE Trans. on Software Engineering, 49, 4, pp. 1433-1463, (2023)
  • [44] Jiang YJ, Liu H, Niu N, Zhang L, Hu YM., Extracting concise bug-fixing patches from human-written patches in version control systems, Proc. of the 43rd IEEE/ACM Int’l Conf. on Software Engineering (ICSE), pp. 686-698, (2021)