Abstract:A commonly-used software fault localization technique mainly utilizes testing coverage information to calculate the suspiciousness of each program statement to find the faulty statement. However, this technique does not fully take dependences of the program into account; thus, its capacity for precisely locating faults is limited. This paper proposes a more effective hierarchical slicing spectrum-based software fault localization (HSS-SFL) technique for object-oriented programs. HSS-SFL first analyzes the dependence among the elements at different granularity levels including package level, class level, method level and statement level, and deletes some elements which are unrelated to the failed testing outputs. Next, the technique builds the hierarchical slicing spectrum model for these hierarchical slices obtained from the previous step, and further defines a suspiciousness method for each slice element. Finally, the faulty statement is located according to the suspiciousness results. Experimental results on real application programs show that HSS-SFL is more effective to locate the fault than program spectrum-based Tarantula technique, Union technique and Intersection technique.