| In the process of software testing, if the outcome of the software running does not achieve the expected result which means that the software existing failure, we need to find out the reason. The procedure is called fault location. In recent years, there has been a lot of automation technologies developed to positioning program fault. Among them, the fault location technology based on covering information has been proved to be efficient. This method helps developers to find out the reason of program failure through the covering information of passed test cases and failed test cases.In practice, its effectiveness is affected by many factors, one of which is the coincidental correctness. Coincidental correctness refers to the passed test case that its execution trace covers the fault statement, but does not lead to failed result. These test cases affect the correlation between coverage information and failure operation results, and reduce the effective of the fault location.This paper presents a method based on the path similarity to identify the coincidental correctness, which is based on the following assumptions:the more similarity between the coverage path of passed test case and the coverage path of failed test case, the higher probability of this kind of passed test case being the coincidental correctness. Firstly, we should get the sub execution path of each failed execution path. Then calculate the similarity between sub paths of every passed running path of and sub path of adjacent failed running path, which will be regard as the probability that passed test case being the coincidental correctness. At last, the tearing label strategy, sticking label strategy and exchanging label strategy are computed the suspicious of statements.There will be two aspects to evaluate this method:the accuracy of identifying coincidental correctness and the improvement of the effectiveness of the fault location. The experiments results show that, this method can effectively alleviate the negative impact of coincidental correctness and improve the effect of fault location. |