Code clone detection based on order and content of control statements

In this paper, we propose a method to detect duplicate codes based on structure and content of control statements present in the source codes. The proposed method efficiently finds all types of clones. Similarity between two programs is identified by comparing metrics of programs. Metric of a program is computed using control statements, operators and operands present in the program. Proposed method is independent of programming languages. This approach is also useful to detect plagiarized programs in academic environment.

[1]  Lalitha Rangarajan,et al.  Duplicate Code Detection using Control Statements , 2015 .

[2]  Chanchal K. Roy,et al.  A Survey on Software Clone Detection Research , 2007 .

[3]  Rainer Koschke,et al.  Clone Detection Using Abstract Syntax Suffix Trees , 2006, 2006 13th Working Conference on Reverse Engineering.

[4]  Chanchal Kumar Roy,et al.  Comparison and evaluation of code clone detection techniques and tools: A qualitative approach , 2009, Sci. Comput. Program..

[5]  Yang Yuan,et al.  CMCD: Count Matrix Based Code Clone Detection , 2011, 2011 18th Asia-Pacific Software Engineering Conference.

[6]  Jens Krinke,et al.  Identifying similar code with program dependence graphs , 2001, Proceedings Eighth Working Conference on Reverse Engineering.

[7]  Ettore Merlo,et al.  Experiment on the automatic detection of function clones in a software system using metrics , 1996, 1996 Proceedings of International Conference on Software Maintenance.

[8]  J. Howard Johnson,et al.  Substring matching for clone detection and change tracking , 1994, Proceedings 1994 International Conference on Software Maintenance.

[9]  Stéphane Ducasse,et al.  A language independent approach for detecting duplicated code , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[10]  Lalitha Rangarajan,et al.  Structural Similarity Detection Using Structure of Control Statements , 2015 .