A Deep Learning Based Approach to Detect Code Clones
Guangjie Li, Yi Tang, Xiang Zhang, Biyi Yi · 2020
Code clone is a kind of code smells widely exists in practice. Such code smell may lead to serious problems, e.g., code redundancy and code inconsistency. To reduce the negative impact of code clones, researchers have proposed different approaches to detect and remove code clones. However, existing code clone detection approaches mostly rely on manually designed and fine-tuned heuristic rules. Such approaches cannot be exploited in different projects and the precision of them needs to improve further. To this end, this paper proposes a deep learning based approach to detect code clones by statically extracting syntactic features from the ASTs of source files. Evaluation results suggest that the proposed approach is effective in detecting code clones, its precision is around 90%.