UCL Discovery
UCL home » Library Services » Electronic resources » UCL Discovery

A Picture Is Worth a Thousand Words: Code Clone Detection Based on Image Similarity

Ragkhitwetsagul, C; Krinke, J; Marnette, B; (2018) A Picture Is Worth a Thousand Words: Code Clone Detection Based on Image Similarity. In: Zou, Ying and Stephan, Matthew, (eds.) Proceedings of 2018 IEEE 12th International Workshop on Software Clones (IWSC). IEEE: Campobasso, Italy. Green open access

[thumbnail of Krinke_c2ad1ee-35579-preprint.pdf]
Preview
Text
Krinke_c2ad1ee-35579-preprint.pdf - Accepted Version

Download (599kB) | Preview

Abstract

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.

Type: Proceedings paper
Title: A Picture Is Worth a Thousand Words: Code Clone Detection Based on Image Similarity
Event: 12th International Workshop on Software Clones
Location: Campobasso, Italy
Dates: 20 March 2018 - 20 March 2018
Open access status: An open access version is available from UCL Discovery
DOI: 10.1109/IWSC.2018.8327318
Publisher version: http://doi.org/10.1109/IWSC.2018.8327318
Language: English
Additional information: This version is the author accepted manuscript. For information on re-use, please refer to the publisher’s terms and conditions.
UCL classification: UCL
UCL > Provost and Vice Provost Offices > UCL BEAMS
UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science
UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science > Dept of Computer Science
URI: https://discovery.ucl.ac.uk/id/eprint/10046744
Downloads since deposit
Loading...
502Downloads
Download activity - last month
Loading...
Download activity - last 12 months
Loading...
Downloads by country - last 12 months
Loading...

Archive Staff Only

View Item View Item