现有错误定位方法难以检测程序遗漏错误,提出一种方法层次的基于参数-值替换的错误定位方法。首先将出现在失败执行中的方法作为可疑方法候选集,计算该集合中元素对程序执行结果的影响度,再利用值替换技术计算高影响度方法的兴趣参数-值映射对,然后依据方法是否包含兴趣参数-值映射对对候选集中方法进行分类,并依据其影响度分别进行排序,最后生成一个可疑方法序列进行错误定位。实验结果表明该方法较其他错误定位方法具有更好的定位效果。
Statistic-based fault localization and slice-based fault localization cannot locate the omission faults effectively. A method-level fault localization approach based on parameter-value replacement was proposed. Those methods appear- ing in failed executions were treated as the fault methods candidate set (FMCS). For each element contained in FMCS, its impact to the execution result was measured and then the FMCS elements based on the impact were classified. For each method with high impact, its interesting parameter value mapping pair (IPVMP) was searched by using parameter-value replacement. According to the impact and IPVMP, a method list of FMCS elements was finally provided to debuggers. Empirical results show that the proposed approach performs better than other fault localization approaches.