Code clone detection based on Doc2vec model and Bagging

Jun Guo Huang · Proceedings of the 2022 2nd International Conference on Control and Intelligent Robotics · 2022

For software analysis and maintenance, the code clone detection has an important role. In order to improve the detection rate of code clone, this paper proposes a code cloning detection method based on Doc2vec model and bagging. Firstly, method converts the code into token sequence and abstract syntax tree sequence. Then, the Doc2vec model is used to learn the lexical and grammatical information of the code respectively. Finally, bagging algorithm is used to detect the cloning of code pairs. The results show that the accuracy and recall of the code clone detection method based on Doc2vec model and bagging is better than that of sourcerercc and tree LSTM on bigclonebench data set.

Read the paper · More papers on PaperTik