错误定位是软件调试中耗时费力的活动之一.针对偶然正确性影响错误定位效率的问题,提出面向错误定位的偶然正确性识别方法.该方法首先识别偶然正确性元素;然后,挑选“偶然正确性特征元素”,使用该特征元素约简程序执行轨迹;在此基础上,建立基于模糊c均值聚类的偶然正确性识别模型,将其结果应用于错误定位.为验证该方法的有效性,基于3组测试程序开展偶然正确性识别,并将其结果应用于Tarantula等4种错误定位方法.实验结果表明,与基于k-means聚类的偶然正确性识别方法相比,该方法在偶然正确性识别方面具有较低的误报率和漏报率,并且更能提高错误定位的效率.
Fault localization is one of the most time-consuming activities in software debugging. An identifying coin- cidental correctness approach for effective fault localization is proposed to decrease the effect of coincidental correctness on the effectiveness of fault localization. First, the elements of coincidental correctness are computed. Second, the higher suspi- cious coincidental correctness elements are selected as feature elements of coincidental correctness, and then program execu- tion traces are reduced in terms of feature elements. Finally ,fuzzy c-means based coincidental correctness identification mod- el is created based on the reduced execution traces to locate faults. It was applied to analyze three groups of programs, and test cases removing coincidental correctness were used as input for four popular fault localization approaches, such as Taran- tula. The experimental results show that our approach had low false positives and false negatives, and performed well in terms of the effectiveness.