Abstract:Second-order mutation testing simulates the actual complex defects in the original program by manually injecting two defects into the original program, which is of great significance in the mutation testing. However, the number of second-order mutants formed by the combination of first-order mutants will greatly increase, which will bring large execution costs. In order to reduce the number of second-order mutants and reduce the time consumption in the running procedure, this study proposes a method of second-order mutant reduction based on SOM neural network. The proposed method firstly utilizes a morecomprehensive combination strategy to generate feasible second order mutants based on traditional first-order mutant generation, and then construct accurate SOM neural network according to the similarity of intermediate values in the execution of second-order mutants, and at last mutants are clustered based on such model to achieve second-order mutant reduction and subtle mutant detection. This study uses the benchmark and open source projects to verify the method. Experimental results show that on the one hand, although the number of mutants is very large, it has decreased significantly through the SOM neural network, while the second-order mutation score level is the same as the pre-unclustered mutation score. However, because the number of second-order mutants performed is significantly reduced, the time cost of mutation testing was greatly lower than the execution of all mutants. On the other hand, subtle second-order mutants that facilitate the addition of test components are found.