(1. School of Computer Science and Engineering,Central South University,Changsha 410083,China; 2. College of Computer Science and Electronic Engineering,Hunan University of Chinese Medicine,Changsha 410208,China) 在知网中查找 在百度中查找 在本站中查找
In order to improve software quality,the combination of refactoring techniques,software metrics,and meta-heuristic search can effectively improve the structure of software without affecting its function. In this paper,a class diagram refactoring method based on Whale Optimization Algorithm is proposed,and the quality model constructed by index coupling,inheritance and abstraction is empolyed to guide the search for the optimal refactoring sequence. Cetacean optimization method is used to refactor the class diagram in six different open source programs. The results show that the class diagram refactor the based on cetacean optimization algorithm is superior to Simulated Annealing Algorithm and Hill Climbing Algorithm in terms of quality gain,and can effectively improve the quality refactoring.