Abstract:In the process of software development, most of the clone code is concentrated inside the function. In order to detect the clone code more quickly and effectively, a code clone detection algorithm based on the internal characteristic?matrix of the function is proposed. By extracting the internal characteristic?of the function, the algorithm converts the comparison of the specific code into the similarity calculation of the characteristic?matrix. The experimental results show that the algorithm can detect all clone functions, and compared with the string-based code clone detection algorithm and the string matching based program code similarity recognition method , the algorithm is superior to the string-based code clone detection algorithm and the string matching based program code similarity recognition method in terms of time and precision. In addition, by using the n-grams algorithm to perform similarity detection on the function name, the algorithm has been significantly improved in operational efficiency.