Enhancing generic code clone detection model for C based application - Ainun Syahirah, Adnan (2019)
Code clone is a term used to describe a code used in a system repeatedly. There are currently four types of code clones, namely type-1, type-2, type-3 and type-4, which can be detected by some code clone detection tools. As far as the quality of a system is concerned, the code clone can cause a system to consume more memory to perform a function, due to the many codes that are repeatedly used. The code clone also affects the system maintenance process. If the copied code fragment contains a bug, all code with similarities to the copied code fragment must be fixed one by one. It takes longer to maintain the system. Applications developed in Java and C usually has the largest occurrence of code clone due to the extreme usage of these languages in application development. Therefore, the main objective of this research is to improve the code clone detection model to detect the code clone in the language of C programming. Various models are available to detect a clone code which is a generic clone model, generic pipeline model, unified clone model and a generic code clone detection model. Generic Code Clone Detection (GCCD) is the state of the art model that detects code clone up to type 4 in Java programs. This model's process is pre-processing, processing, parameterization, categorization and match detection. The aim of this research is to improve the prototype for the detection of code clones in the C programming language. Therefore, the main objective of this research is to improve the prototype of the generic code clone detection model to detect the code clone in the language of C programming. This research focuses on improving two processes, namely pre-processing and transformation. In order to evaluate the improvements made in this research, the GCCD prototype is enhanced and tested using a benchmark data set called Bellon’s benchmark dataset. The expected result of this research is that the GCCD prototype can detect the C programming language code clone.