基于频谱的错误定位技术通常利用覆盖信息来求出程序中每条语句的可疑度,并将语句按照可疑度降序排序以寻找错误语句.文中对已有的基于频谱的错误定位算法进行改进,将失败测试用例的边际权重引入到可疑度计算的过程中,即针对某一特定语句,令失败测试用例的权重随着其对该语句覆盖次数的增加而增大.实验结果表明,相对于其它方法,文中提出的方法对错误定位效率有一定的促进作用,即只需检查更少的语句即可找到出错位置.
Spectra-based fault localization technique uses coverage information to calculate every statement's likelihood of having a bug.And then rank the likelihood in a decreasing order to find the faulty statement.This paper improves the spectra-base fault localization technique by increasing the marginal weight of the failed test cases.That means that as the number of the failed test case increases,the weight of the failed test case also increases.Comparing with reducing or sustaining the weight of covered statement's successful/failed test case,the experimental result shows that increasing the marginal weight of the covered statement's failed test case can promote the fault localization efficiency.