| There are defects in any program,and the existence of defects will bring immeasurable losses.After determining the existence of the defect,it is necessary to use the program defect localization technology to locate the location of the defect.There are two common problems in current program defect location technology: Program defect localization technology usually judges the defect location by analyzing the coverage information difference between test cases,which requires obtaining and analyzing the coverage information of each test case.The existing program defect localization technology usually uses the original test case set,which leads to high time cost of executing test cases,which in turn increases the cost of program defect localization,and the existence of a large number of redundant test cases may also reduce the accuracy of program defect localization;The traditional method of locating program defects is usually to manually set breakpoints on the program to record the running status of test cases and collect relevant information,which is largely dependent on manual completion and complicated operations,which causes its positioning efficiency is not very high and time-consuming.Therefore,it is important to study how to reduce the original test case set and how to automate the defect location and improve its efficiency and accuracy in the direction of program defect location.Based on this,this paper proposes a program defect localization method based on deep neural network and a test case reduction method combining multiple coverage criteria and information entropy.The main work of this paper is as follows:1.Aiming at the problem of program defect location,a method combining multiple coverage criteria and information entropy to reduce test cases is proposed: Delete successful test cases that are weakly related to failed test cases by analyzing the statement coverage information;Analyze the execution path information to retain the successful test cases that are similar to the cycle path of the failed test cases,and delete the successful test cases with redundant cycle paths;Use information entropy to quantify the error-checking ability of test cases,and delete successful test cases with weak error-checking ability.Siemens Suite is selected as the experimental object.Compared with the other four reduction methods,the reduction method in this paper has the highest average reduction rate of54.81%,and the number of successful test cases reserved is the most,and the effective test cases are reserved,which greatly reduces the execution time consumption of test cases;2.Aiming at the problem of inconvenient parameter setting in the existing deep learning-based defect location method,combining genetic algorithm(GA),L2 regularization and deep neural network(DNN)to establish a Gl2-DNN deep neural network model.A Gl2-DNN-based program defect localization method is proposed: Use genetic algorithm to find the optimal parameters of the deep neural network,use L2 regularization to prevent the model from overfitting,which optimizes the deep neural network;Input the coverage information as Gl2-DNN to obtain the sentence suspicious degree table;Locate from high to low according to the suspicious degree table.It is verified through experiments that compared with the other four program defect localization methods,the algorithm in this paper can locate defects more accurately,and the location efficiency has been improved.To find out all the wrong versions of defect sentences,only 75% of the sentences need to be searched;And verified the impact of the reduction method proposed in this paper on the accuracy of the Gl2-DNN program defect localization method.The average Fault_recall ratio of the reduced test case set is about 3.7% higher than that of the original test case set.The Expense_increase is all negative,with an average of about-1.02,which improves the efficiency and accuracy of locating defects,and greatly reduces the time cost. |