Code Clone Detection Based on Code Semantic Enhancement Model

Zhang Chun-yan, Shen Ziang, Liang Chen · 2023

Code clones are code fragments that are similar in composition or semantics of code statements, which can significantly improve software development efficiency and reduce costs by improving the quality of reusable code. However, existing code clone detection methods ignore the source code structure information and sequence information seriously. In this paper, we launched our research on the harder-to-break Type IV code clone detection, and propose a new method, namely Aug_Clone, to complete code clone detection task. Firstly, we utilize our published code semantic enhancement model to obtain the code semantic vector. Secondly, we perform code clone detection by calculating the similarity between these semantic vectors. At last, we evaluate our method on a large public data set, and experimental results show improvement over the state-of-the-art benchmarks, which demonstrates the effectiveness and efficiency of our method.

Read the paper · More papers on PaperTik