Fault localization is an important and challeng- ing task during software testing. Among techniques studied in this field, program spectrum based fault localization is a promising approach. To perform spectrum based f...Fault localization is an important and challeng- ing task during software testing. Among techniques studied in this field, program spectrum based fault localization is a promising approach. To perform spectrum based fault local- ization, a set of test oracles should be provided, and the ef- fectiveness of fault localization depends highly on the quality of test oracles. Moreover, their effectiveness is usually af- fected when multiple simultaneous faults are present. Faced with multiple faults it is difficult for developers to determine when to stop the fault localization process. To address these issues, we propose an iterative fauk localization process, i.e., an iterative process of selecting test cases for effective fault localization (IPSETFUL), to identify as many faults as pos- sible in the program until the stopping criterion is satisfied. It is performed based on a concept lattice of program spec- trum (CLPS) proposed in our previous work. Based on the labeling approach of CLPS, program statements are catego- rized as dangerous statements, safe statements, and sensitive statements. To identify the faults, developers need to check the dangerous statements. Meantime, developers need to se- lect a set of test cases covering the dangerous or sensitive statements from the original test suite, and a new CLPS is generated for the next iteration. The same process is pro- ceeded in the same way. This iterative process ends until there are no failing tests in the test suite and all statements on the CLPS become safe statements. We conduct an empirical study on several subject programs, and the results show that IPSETFUL can help identify most of the faults in the program with the given test suite. Moreover, it can save much effort in inspecting unfaulty program statements compared with the existing spectrum based fault localization techniques and the relevant state of the art technique.展开更多
文摘Fault localization is an important and challeng- ing task during software testing. Among techniques studied in this field, program spectrum based fault localization is a promising approach. To perform spectrum based fault local- ization, a set of test oracles should be provided, and the ef- fectiveness of fault localization depends highly on the quality of test oracles. Moreover, their effectiveness is usually af- fected when multiple simultaneous faults are present. Faced with multiple faults it is difficult for developers to determine when to stop the fault localization process. To address these issues, we propose an iterative fauk localization process, i.e., an iterative process of selecting test cases for effective fault localization (IPSETFUL), to identify as many faults as pos- sible in the program until the stopping criterion is satisfied. It is performed based on a concept lattice of program spec- trum (CLPS) proposed in our previous work. Based on the labeling approach of CLPS, program statements are catego- rized as dangerous statements, safe statements, and sensitive statements. To identify the faults, developers need to check the dangerous statements. Meantime, developers need to se- lect a set of test cases covering the dangerous or sensitive statements from the original test suite, and a new CLPS is generated for the next iteration. The same process is pro- ceeded in the same way. This iterative process ends until there are no failing tests in the test suite and all statements on the CLPS become safe statements. We conduct an empirical study on several subject programs, and the results show that IPSETFUL can help identify most of the faults in the program with the given test suite. Moreover, it can save much effort in inspecting unfaulty program statements compared with the existing spectrum based fault localization techniques and the relevant state of the art technique.