Image-Based Clone Code Detection and Visualization

Yafang Wang, Dongsheng Liu · 2019

Currently, research mainly focuses on four perspectives of text, vocabulary, grammar and semantics in the field of clone code detection. However, few breakthroughs have been made in the effect of clone code detection for a long time. For this purpose, a new image-based clone code detection and visualization (ICCV) is proposed with the inspiration of image processing. First, the source code is preprocessed by removing comments, whitespace, etc. from which a "clean" function fragment can be obtained, and the identifiers, keywords, etc. in the function can also be highlighted; Then the processed source code is converted into images and these images are normalized; Finally, Jaccard distance and perceptual hash algorithm are used to detect and visualize the clone code information. In order to verify the validity of the experiment, six open source software were used to constitute the evaluation data set for testing. The experimental results show that ICCV can detect 100% type-1 clone code, 88% type-2 clone code and 60% type-3 clone code, which proves the good effect of ICCV on clone code detection.

Read the paper · More papers on PaperTik