Abstract:Detecting faults is tedious and time-consuming,in order to improve the efficiency and accuracy of traditional software fault location methods, a new method of fault location based on spectrum is proposed; the relationship between failed test cases and faults is fully utilized, and the key techniques and methods of logic conjunction operations are adopted to streamline the failed test cases and optimize the spectrum information in the failed test cases by using spectrum enhancement. The method of spectrum enhancement is applied to both single-fault and multi-fault program scenarios for the first time. In Siemens programs with embedded faults and Defects4j programs with real faults, experimental tests have demonstrated that this research method can significantly reduce the scope of code checking, especially in the high performance range (EXAM 5%), and can effectively locate more than about 20% of the original faults by checking Top-1 only, showing that the spectrum enhancement-based fault location method effectively improves the checking rate and can better help programmers pinpoint the location of faults.