TY - GEN
T1 - A picture is worth a thousand words
T2 - 12th IEEE International Workshop on Software Clones, IWSC 2018
AU - Ragkhitwetsagul, Chaiyong
AU - Krinke, Jens
AU - Marnette, Bruno
N1 - Publisher Copyright:
© 2018 IEEE.
PY - 2018/3/27
Y1 - 2018/3/27
N2 - This paper introduces a new code clone detection technique based on image similarity. The technique captures visual perception of code seen by humans in an IDE by applying syntax highlighting and images conversion on raw source code text. We compared two similarity measures, Jaccard and earth mover's distance (EMD) for our image-based code clone detection technique. Jaccard similarity offered better detection performance than EMD. The F1 score of our technique on detecting Java clones with pervasive code modifications is comparable to five well-known code clone detectors: CCFinderX, Deckard, iClones, NiCad, and Simian. A Gaussian blur filter is chosen as a normalisation technique for type-2 and type-3 clones. We found that blurring code images before similarity computation resulted in higher precision and recall. The detection performance after including the blur filter increased by 1 to 6 percent. The manual investigation of clone pairs in three software systems revealed that our technique, while it missed some of the true clones, could also detect additional true clone pairs missed by NiCad.
AB - This paper introduces a new code clone detection technique based on image similarity. The technique captures visual perception of code seen by humans in an IDE by applying syntax highlighting and images conversion on raw source code text. We compared two similarity measures, Jaccard and earth mover's distance (EMD) for our image-based code clone detection technique. Jaccard similarity offered better detection performance than EMD. The F1 score of our technique on detecting Java clones with pervasive code modifications is comparable to five well-known code clone detectors: CCFinderX, Deckard, iClones, NiCad, and Simian. A Gaussian blur filter is chosen as a normalisation technique for type-2 and type-3 clones. We found that blurring code images before similarity computation resulted in higher precision and recall. The detection performance after including the blur filter increased by 1 to 6 percent. The manual investigation of clone pairs in three software systems revealed that our technique, while it missed some of the true clones, could also detect additional true clone pairs missed by NiCad.
UR - https://www.scopus.com/pages/publications/85049673275
U2 - 10.1109/IWSC.2018.8327318
DO - 10.1109/IWSC.2018.8327318
M3 - Conference contribution
AN - SCOPUS:85049673275
T3 - 2018 IEEE 12th International Workshop on Software Clones, IWSC 2018 - Proceedings
SP - 44
EP - 50
BT - 2018 IEEE 12th International Workshop on Software Clones, IWSC 2018 - Proceedings
PB - Institute of Electrical and Electronics Engineers Inc.
Y2 - 20 March 2018
ER -