基于历史缺陷信息检索的语句级软件缺陷定位方法
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP311

基金项目:

江苏省前沿引领技术基础研究专项(BK202002001); 国家自然科学基金(61702041); 北京信息科技大学“勤信人才”培育计划(QXTCP C201906)


Statement Level Software Bug Localization Based on Historical Bug Information Retrieval
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    软件在开发和维护过程中会产生大量缺陷报告, 可为开发人员定位缺陷提供帮助. 基于信息检索的缺陷定位方法通过分析缺陷报告内容和源码文件的相似度来定位缺陷所在位置, 已在文件、函数等粗粒度级别上取得了较为精确的定位效果, 但由于其定位粒度较粗, 仍需要耗费大量人力和时间成本检查可疑文件和函数片段. 为此, 提出一种基于历史缺陷信息检索的语句级软件缺陷定位方法STMTLocator, 首先检索出与被测程序缺陷报告相似度较高的历史缺陷报告, 并提取其中的历史缺陷语句; 然后根据被测程序源码文件与缺陷报告的文本相似度检索可疑文件, 并提取其中的可疑语句; 最后计算可疑语句与历史缺陷语句的相似度, 并进行降序排列, 以定位缺陷语句. 为评估STMTLocator的缺陷定位性能, 使用Top@NMRR等评价指标在基于Defects4J和JIRA构建的数据集上进行对比实验. 实验结果表明, 相比静态缺陷定位方法BugLocator, STMTLocator在MRR指标上提升近4倍, 在Top@1指标上多定位到7条缺陷语句; 相比动态缺陷定位方法Metallaxis和DStar, STMTLocator完成一个版本缺陷定位平均消耗的时间减少98.37%和63.41%, 且具有不需要设计和执行测试用例的显著优势.

    Abstract:

    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.

    参考文献
    相似文献
    引证文献
引用本文

岳雷,崔展齐,陈翔,王荣存,李莉.基于历史缺陷信息检索的语句级软件缺陷定位方法.软件学报,,():1-20

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2023-02-06
  • 最后修改日期:2023-03-28
  • 录用日期:
  • 在线发布日期: 2023-09-06
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号