z-logo
open-access-imgOpen Access
Enhancing code clone detection using control flow graphs
Author(s) -
Dong Kwan Kim
Publication year - 2019
Publication title -
international journal of power electronics and drive systems/international journal of electrical and computer engineering
Language(s) - English
Resource type - Journals
eISSN - 2722-2578
pISSN - 2722-256X
DOI - 10.11591/ijece.v9i5.pp3804-3812
Subject(s) - computer science , clone (java method) , snippet , classifier (uml) , extractor , software maintenance , source code , programming language , control flow , artificial intelligence , control flow graph , software , software development , biology , dna , genetics , process engineering , engineering
Code clones are syntactically or semantically equivalent code fragments of source code. Copy-and-paste programming allows software developers to improve development productivity, but it could produce code clones that can introduce non-trivial difficulties in software maintenance. In this paper, a code clone detection framework is presented with a feature extractor and a clone classifier using deep learning. The clone classifier is trained with true and false clones and then is tested with a test dataset to evaluate the performance of the proposed approach to clone detection. In particular, the proposed approach to clone detection uses Control Flow Graphs (CFGs) to extract features of a given code snippet. The selected features are used to compute similarity scores for comparing two code fragments. The clone classifier is trained and tested with similarity scores that quantify the degree of how similar two code fragments are. The experimental results demonstrate that using CFG features is a viable methodology in terms of the effectiveness of clone detection for both syntactic and semantic clones.

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here