Abstract
Over the past few years the revolution in the technology and use of programming languages for product development has made code reusability a common practice. Consequently the problem of code cloning is also increasing leading to redundancy and increased maintenance cost. The real motivation of the proposed research work is to identify code clones from pair of codes that are going to be utilized for a project under consideration. Existing practices such as control flow graphs (CFGs) and abstract syntax tree (AST) promote a high level of abstraction by masking the inner details of the code. Therefore, a strategy is needed to define the mechanism for calculation of the threshold value to identify clones by considering the inner details of the code. This paper presents a defined mechanism for the computation of threshold for code clone detection. Moreover, the inner details of the code are examined by performing the comparative analysis of tokens and conditional clauses. The proposed technique eliminates high level of abstraction caused by the use of CFGs. The proposed method is tested on custom dataset of different sorting algorithms. Experimental results indicate the effectiveness of the proposed method for code clone detection.
Cite
CITATION STYLE
Mehboob, R., Shabbir, S., & Javed, A. (2018). A Technique of Code Clone Detection based on Defined Mechanism for Threshold Calculation. The Nucleus, 54(4), 197–204. https://doi.org/10.71330/thenucleus.2017.258
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.