首页 | 本学科首页   官方微博 | 高级检索  
     

融合代码静态特征和频谱的软件缺陷定位技术
引用本文:王浩仁,岳雷,李静雯,崔展齐.融合代码静态特征和频谱的软件缺陷定位技术[J].计算机应用研究,2023,40(9):2785-2791.
作者姓名:王浩仁  岳雷  李静雯  崔展齐
作者单位:北京信息科技大学计算机学院
基金项目:国家自然科学基金资助项目(61702041);;北京市教委科技计划资助项目(KM201811232016);
摘    要:基于频谱的缺陷定位(spectrum-based fault localization, SBFL)通过分析测试用例的覆盖信息和执行结果信息进行快速定位,是目前最常用的缺陷定位技术。然而,该方法未能充分利用代码中隐含的语义和结构信息。若能将缺陷预测中使用到的代码结构信息和频谱信息融合使用,将有助于进一步提升缺陷定位的效果。为此,提出了一种融合代码静态特征和频谱的软件缺陷定位(fault localization combing static features and spectrums, FLFS)技术。首先,从Halstead等度量元集合中选取度量元指标并进行修改,以适用于度量代码的方法级特征;然后,根据选取的度量元指标提取程序中各个方法的静态特征并用于训练缺陷预测模型;最后,使用缺陷预测模型预测程序中各方法存在缺陷的预测可疑度,并与SBFL技术计算的频谱可疑度进行融合,以定位缺陷所在方法。为验证FLFS的有效性,将其与两种定位效果最好的SBFL技术DStar和Ochiai在Defects4J数据集上进行了对比实验。结果表明,FLFS具有更好的缺陷定位性能,对于Einspe...

关 键 词:缺陷定位  缺陷预测  程序频谱  代码结构信息  可疑度
收稿时间:2023/2/20 0:00:00
修稿时间:2023/8/15 0:00:00

Fault Localization based on Combing Static Features and Spectrums
Wang Haoren,Yue Lei,Li Jingwen and Cui Zhanqi.Fault Localization based on Combing Static Features and Spectrums[J].Application Research of Computers,2023,40(9):2785-2791.
Authors:Wang Haoren  Yue Lei  Li Jingwen and Cui Zhanqi
Affiliation:Beijing Information Science and Technology University,,,
Abstract:SBFL is the most commonly used fault localization technique, which performs fast localization by analyzing the coverage and execution result information of test cases. However, SBFL fails to fully utilize the implicit semantic and structural information of the code. If the code structure information used in fault prediction and the spectrum information can be fused, it will further improve the effectiveness of fault localization. To this end, this paper proposed a software FLFS method. Firstly, it selected feature from the metrics, including Halstead, CK, etc, and adapted them to measure the method-level features of the code. Then, it extracted the static features of each method in the program according to the metrics and used them to train the fault prediction model. Finally, it used the fault prediction model to predict the prediction suspiciousness of each method in the program and fused it with the spectrum suspiciousness calculated by SBFL to locate the faulty method. To verify the effectiveness of FLFS, this paper compared it with two most effective SBFL techniques, DStar and Ochiai, on the Defects4J dataset. The results show that FLFS outperforms SBFL in terms of Einspect@n, and MRR. For Einspect@n, when n=1, FLFS locates 16 and 10 more faults than DStar and Ochiai respectively. For MRR, FLFS improves by 4.13% and 1.08% compared to DStar and Ochiai respectively.
Keywords:fault localization  fault prediction  program spectrum  code structure information  suspiciousness
点击此处可从《计算机应用研究》浏览原始摘要信息
点击此处可从《计算机应用研究》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号