期刊文献+

基于冗余覆盖信息约简的软件缺陷定位方法

Software Fault Localization Based on Redundant Coverage Information Reduction
下载PDF
导出
摘要 软件规模和复杂程度的不断提高,为软件质量保障带来了严峻的挑战.软件缺陷定位是一种重要的软件质量保障技术,其中基于频谱的缺陷定位(Spectrum-based Fault Localization,SFL)是应用最为广泛的软件缺陷定位技术,其通过分析语句覆盖信息矩阵计算代码语句的可疑度值,并根据可疑度值定位缺陷所在语句.然而,语句覆盖信息矩阵中存在着严重的数据冗余问题,冗余的数据极大地影响了SFL的缺陷定位性能.以Defects4J数据集中395个程序的语句覆盖信息矩阵为例,在超过一半的语句覆盖信息矩阵中有90%的语句存在与其具有相同覆盖信息的语句.特征选择是常用的数据预处理技术,通过去除冗余和不相关特征来获取原始特征集中有价值的特征子集.因此,我们将语句覆盖信息矩阵作为原始特征集,将冗余覆盖信息约简建模为特征选择问题,提出了一种基于冗余覆盖信息约简的软件缺陷定位方法(Fault Localization based on Redundant coverage information Reduction,FLRR).首先,使用特征选择技术对语句覆盖信息和测试用例执行结果组成的语句覆盖信息矩阵进行约简,得到语句覆盖信息矩阵子集;然后,使用SFL计算语句覆盖信息矩阵子集中语句的可疑度值,并根据可疑度值对语句进行降序排列,以定位缺陷语句.本文使用六种常用的特征选择技术对语句覆盖信息矩阵进行特征选择和约简,以得到语句覆盖信息矩阵子集,并使用四种典型的SFL技术对语句覆盖信息矩阵子集中的语句进行缺陷定位.为评估FLRR的缺陷定位性能,本文使用E_(inspect)@n和MRR(Mean Reciprocal Rank)评价指标在基于Defects4J的数据集上与四种典型的SFL技术进行了对比实验.实验结果表明,FLRR能够有效提升SFL的缺陷定位性能.对于E_(inspect)@n指标,当n=1时,FLRR相比DStar、Ochiai、Barinel和OP2分别多定位到23条、26条、14条和13条缺陷语句,分别增加了69.70%、76.47%、45.16%和38.24%;对于MRR指标,FLRR相比DStar、Ochiai、Barinel和OP2分别提升了20.08%、24.94%、17.45%和19.15%. As the scale and complexity of software increase,it becomes more difficult to ensure its quality and reli-ability.Some of the most important software quality and reliability assurance methods are software fault localization tech-niques,of which spectrum-based fault localization(SFL)is the most commonly used.SFL calculates the suspicious values of code statements by analyzing the statement coverage matrix,locating the faulty statements according to the suspicious values.However,the statement coverage matrix suffers from a serious redundancy problem,which severely impairs the fault localization performance of SFL.For instance,in more than half of the statement coverage matrices of 395 programs in the Defects4J dataset,there are other statements with the same coverage information for 90%of the statements.Feature selection,a data preprocessing technique,is often used to obtain valuable feature subsets by removing redundant and irrele-vant features.We propose a software fault localization approach,based on redundant coverage information reduction(FLRR),by taking the statement coverage matrix as the original feature set and modeling the reduction of redundant cover-age information as a feature selection problem.First,feature selection techniques are applied to reduce the statement cover-age matrix,which includes both statement coverage information and test case execution results,to obtain a subset of the ma-trix.Second,SFL is used to calculate the suspicious values of statements in the statement coverage matrix subset,and the statements are sorted in descending order according to their suspicious values.The method presented in this paper uses six common feature selection techniques to perform feature selection and reduction on the statement coverage matrix,to obtain the subset of the matrix,and then uses four typical SFL techniques to localize faulty statements in the subset.To evaluate the fault localization performance of FLRR,comparative experiments were conducted with four typical SFL techniques on the Defects4J dataset,using E_(inspect)@n and MRR(Mean Reciprocal Rank)as evaluation metrics.Experimental results show that FLRR can improve the fault localization performance of SFL.When compared with DStar,Ochiai,Barinel,and OP2,FLRR located 23,26,14,and 13 more faulty statements,improved E_(inspect)@n(n=1)by 69.70%,76.47%,45.16%,and 38.24%,and improved MRR by 20.08%,24.94%,17.45%,and 19.15%,respectively.
作者 王浩仁 崔展齐 岳雷 陈翔 郑丽伟 WANG Hao-ren;CUI Zhan-qi;YUE Lei;CHEN Xiang;ZHENG Li-wei(School of Computer Science,Beijing Information Science and Technology University,Beijing 100101,China;School of Computer Science and Technology,Nantong University,Nantong,Jiangsu 226019,China)
出处 《电子学报》 EI CAS CSCD 北大核心 2024年第1期324-337,共14页 Acta Electronica Sinica
基金 江苏省前沿引领技术基础研究专项(No.BK20202001) 国家自然科学基金(No.61702041) 北京信息科技大学“勤信人才”培育计划(No.QXTCPC201906)。
关键词 缺陷定位 特征选择 软件调试 可疑度 语句覆盖信息 测试用例 fault localization feature selection software debugging suspicious value statement coverage informa-tion test case
  • 相关文献

参考文献9

二级参考文献84

共引文献228

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部