查找程序中缺陷代码所在的位置是一项值得深入开展的研究,同时也是实际软件调试过程中所面临的一个难题,这一过程往往需要耗费大量的时间和人力资源.研究软件缺陷定位的一类重要方法是基于谓词的统计学缺陷定位方法(简称PBSFL)-PBSFL通过比较程序运行成功与失败时谓词的执行信息差异来获得谓词与缺陷的关联程度.然而实验研究发现,固定算法中信息利用的强度会造成信息利用不足或过分利用现象的发生,导致现有PBSFI。方法对某些缺陷定位不够准确.针对这一问题,文中设计了一种基于谓词执行信息分析的自适应缺陷定位算法,该算法通过分析测试用例运行时谓词的执行情况来动态地为每个谓词选择合适的信息利用强度.实验结果表明,该方法在Siemens和spsce两个程序包上表现出很好的定位效果以及定位稳定性.
Finding the location of a fault in code is an important research and practical problem, which often requires much time and manual effort. Predicate-based statistical fault localization (PBSFL) is a promising method, which obtains the correlative relationship between predicates and faults by comparing the predicate execution information in both correct and incorrect runs. However, experiment results show that existing PBSFL methods fail to locate some faults because they use predicate execution information in a fixed intensity, which may cause insufficient or excessive usage. To solve the problem, we propose a new method, called self-adaptive fault localization algorithm based on predicate execution information analysis, which dynamically select the intensity of information utilization for each predicate through the analysis of test cases run. Experimental results demonstrate that our approach performs well in both accuracy and stability for localizing faults in subject programs of the Siemens and space suites.