基于变异的错误定位(MBFL)是最近提出的一种自动化程序错误定位技术, 错误定位精度高, 但伴随着庞大的执行开销, 严重制约了其在工业领域的应用. 研究人员主要从减少变异体数量、减少测试用例数量和优化变异体的执行过程三个方面优化MBFL的执行效率. 前两种方法被广泛研究并取得很好的定位效果, 但对MBFL测试用例方面的研究较少, 且存在错误定位精度损失的问题. 为解决该问题, 本文提出了一种基于信息熵的测试用例约减方法(IETCR). IETCR首先计算出测试用例的信息熵, 然后根据信息熵对测试用例进行排序, 最后选择少量有价值的测试用例执行变异体. 在SIR中 6个程序100个版本上的实验结果表明, IETCR能够约减56.3%~88.6%的MBFL执行开销, 而且几乎保持与原始MBFL相同的错误定位精度.
Mutation Based Fault Localization (MBFL) is a recently proposed approach with the advantage of high fault localization accuracy but limited to actual use in industry area since its huge mutation execution cost. Researchers improve MBFL’s execution efficiency from three aspects: reducing the number of mutants, reducing the number of test cases, and optimizing the mutant’s execution process. The former two methods were studied a lot and showed promising results, but in terms of reducing the number of test cases during MBFL, the related studies were limited for losing the precision of fault localization. In this study, we propose an Information Entropy based Test Cases Reduction strategy (IETCR) for MBFL. IETCR first calculates the information entropy of test cases, then sorts them according to the information entropy. Finally, it selects a small number of valuable test cases to execute mutants. Empirical studies are conducted on 100 fault versions of 6 programs from the SIR repository. The results show that IETCR can reduce 56.3%–88.6% mutation execution cost while keeping almost the same fault localization accuracy with the original MBFL.