针对典型的软件故障定位方法需要将大量失效运行和成功运行相比较来定位有问题的语句,从而不可避免地存在大量运行路径冗余,导致定位效率和准确性降低的问题进行了研究,提出了一种基于运行差异统计的故障定位方法。该方法首先对所有的成功运行和失效运行聚类,消除运行路径冗余,然后对剩余数据通过对失效运行与成功运行的差异进行统计的方法得出故障报告,并对故障报告中的语句进行重要性排序。实验结果表明,这种方法比Wang的传统方法在定位效率和准确性方面都有很大提高。
The authors studied in detail a typical approach to software fault location that pinpoints buggy statements by comparing a large amount of failing program runs with some successful runs, and analyzed the reason of its lower efficiency and accuracy of pinpointing that required execution data inevitably contain a large number of redundant execution paths, and based on this, presented an improved fault localization method by statistical analysis of the difference between reduced program runs. The method can be described below: first, a clustering method is used to eliminate the redundancy in execution paths, next, the statistics of difference between the reduced failing runs and successful runs is calculated, and then, the bug report by ranking the buggy statements is generated. The experimental results show that the proposed algorithm is greatly improved in terms of the efficiency and accuracy compared with the above mentioned Wang' s algorithm.