To enhance the performance of software defect detection,a refined model called LFWOA-SVM has been proposed,utilizing an improved Whale algorithm to optimize traditional SVM.This approach aims at inherent issues of SVM,such as low classification accuracy and complex parameter tuning.First,in view of the problems of slow convergence speed,low optimization efficiency and local optimal solution in the whale algorithm during the solution process,the whale foraging stage was optimized based on the levy flight strategy to maximize the diversification of search agents,and a hybrid mutation perturbation was proposed operators were used to improve WOA's global optimization capabilities.Secondly,the improved whale algorithm LFWOA was used to optimize the penalty factor and kernel function parameters of SVM,which can be effectively used in software defect detection while obtaining the optimal parameters.Finally,data simulation experiments show that among 6 benchmark test functions,LFWOA exhibits higher optimization speed and global search capabilities;tests on 8 public software defect data sets show that LFWOA-SVM method can effectively improve identification performance and prediction accuracy.