Page 132 - 《软件学报》2020年第11期
P. 132
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
Journal of Software,2020,31(11):3448−3460 [doi: 10.13328/j.cnki.jos.006021] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
∗
基于词频-逆文件频率的错误定位方法
1
3
1
2
1,3
张 卓 , 雷 晏 , 毛晓光 , 常 曦 , 薛建新 , 熊庆宇 2
1
(国防科技大学 计算机学院,湖南 长沙 410073)
2
(重庆大学 大数据与软件学院,重庆 400044)
3 (上海第二工业大学 计算机与信息工程学院,上海 200127)
通讯作者: 雷晏, E-mail: yanlei@cqu.edu.cn
摘 要: 错误定位方法大多通过分析语句覆盖信息来标识出导致程序失效的可疑语句.其中,语句覆盖信息通常
以语句执行或语句未执行的二进制状态信息来表示.然而,该二进制状态信息仅表明该语句是否被执行的信息,无法
体现该语句在具体执行中的重要程度,可能会降低错误定位的有效性.为了解决这个问题,提出了基于词频-逆文件
频率的错误定位方法.该方法采用词频-逆文件频率技术识别出单个测试用例中语句的影响程度高低,从而构建出
具有语句重要程度识别度的信息模型,并基于该模型来计算语句的可疑值.实验结果表明,该方法大幅提升了错误定
位的效能.
关键词: 错误定位;词频;逆文件频率;可疑值
中图法分类号: TP311
中文引用格式: 张卓,雷晏,毛晓光,常曦,薛建新,熊庆宇.基于词频-逆文件频率的错误定位方法.软件学报,2020,31(11):
3448−3460. http://www.jos.org.cn/1000-9825/6021.htm
英文引用格式: Zhang Z, Lei Y, Mao XG, Chang X, Xue JX, Xiong QY. Fault localization approach using term frequency and
inverse document frequency. Ruan Jian Xue Bao/Journal of Software, 2020,31(11):3448−3460 (in Chinese). http://www.jos.org.
cn/1000-9825/6021.htm
Fault Localization Approach Using Term Frequency and Inverse Document Frequency
2
1
1
3
1,3
ZHANG Zhuo , LEI Yan , MAO Xiao-Guang , CHANG Xi , XUE Jian-Xin , XIONG Qing-Yu 2
1
(College of Computer, National University of Defense Technology, Changsha 410073, China)
2
(School of Big Data and Software Engineering, Chongqing University, Chongqing 400044, China)
3
(College of Computer and Information Engineering, Shanghai Polytechnic University, Shanghai 200127, China)
Abstract: Most existing fault localization approaches utilize statement coverage information to identify suspicious statements
potentially responsible for failures. They generally use the binary status information to represent the statement coverage information,
indicating a statement executed or not executed. However, the binary information just shows whether a statement is executed or not
whereas it cannot evaluate the importance of a statement in a specific execution. Consequently, this may degrade fault localization
performance. To address this issue, this study proposes a fault localization approach using term frequency and inverse document frequency.
Specifically, the proposed approach constructs an information model to successfully identify the influence of a statement in a test case,
and uses the information model to evaluate the suspiciousness of a statement of being faulty. The experiments show that the proposed
approach significantly improves fault localization effectiveness.
Key words: fault localization; term frequency; inverse document frequency; suspiciousness
∗ 基金项目: 国家自然科学基金(61620106007, 61602504, 61502296, 61672529); 中央高校基本科研业务费专项资金(2019CDXY
RJ0011)
Foundation item: National Natural Science Foundation of China (61620106007, 61602504, 61502296, 61672529); Fundamental
Research Funds for the Central Universities (2019CDXYRJ0011)
收稿时间: 2019-07-18; 修改时间: 2019-10-28, 2019-12-22; 采用时间: 2020-01-18; jos 在线出版时间: 2020-04-21