Abstract
This paper presents a technique to detect clones in source code by comparing the operations performed in the statements comprising a function. The key concept used is that two functions are considered clones if the statements in the functions perform the same operation up to a certain extent. This could be ascertained by categorizing the available statement types based on the operations performed (for instance, addition, multiplication, function invocation, etc). Then, a category is assigned to each statement present in every function in the source code. Comparisons are then made between functions by comparing the categories of the statements to each other. If one function contains exactly the same categories of statement as another (same operations performed in both the functions), or contains a subset of statement categories (operations performed in one function are subset of another), then these functions are judged to be clones.
- Baker S., "A Program for Identifying duplicated Code", Computing Science and Statistics, vol. 24, pp. 49--57, 1992.Google Scholar
- Benjamin Biegel and Stephan Diehl "Highly Configurable And Extensible Code Clone Detection" Benjamin Biegel and Stephan Diehl University of Trier, Germany.Google Scholar
- Chanchal Kumar Roy and James R.Cordy: "A survey on Software Clone Detection Research" Technical Report No: 2007-541, School of computing, Queens University at Kingston Ontario, Canada (September 26, 2007).Google Scholar
- Filip Van Rysselberghe, Serge Demeyer. Evaluating Clone Detection Techniques. In Proceedings of the International Workshop on Evolution of Large Scale Industrial Applications (ELISA'03), 12pp., Amsterdam, The Netherlands, September 2003Google Scholar
- Ian J. Davis and Michael W Godfrey: Clone detection by exploiting assembler.Google Scholar
- Ira Baxter, Andrew Yahin, Leonardo Moura, Marcelo Sant Anna. Clone Detection Using Abstract Syntax Trees. The 14th International Conference on Software Maintenance (ICSM'98), pp. 368--377, Bethesda, Maryland, November 1998. Google ScholarDigital Library
- JCD (Java Clone Detector): http://www.swag.uwaterloo.ca/jcd/Google Scholar
- Lingxiao Jiang, Ghassan Misherghi, Zhendong Su and Stephane Glondu University of California, "DECKARD: Scalable and Accurate Tree-based Detection of Code Clones Davis" 2007.Google Scholar
- Miryung Kim, Vibha Sazawal and Gail C Murphy "An empirical study of code clone Genealogies" University of Washington, Seattle, Washington, USA: 2005.Google Scholar
- Peter Bulychev, Marius Minea -- Duplicate code detection using anti-unification.Google Scholar
- Randy Smith and Susan Horwitz "Detecting and measuring similarity in Code Clones" Department of Computer Sciences, University of Wisconsin-Madison: 2002Google Scholar
- Soot: A java optimization framework: www.sable.mcgill.ca/sootGoogle Scholar
- Toshihiro Kamiya, Shinji Kusumoto, Katsuro Inoue. CCFinder: A Multilinguistic Token-Based Code Clone Detection System for Large Scale Source Code. Transactions on Software Engineering, Vol. 28(7): 654--670, July 2002. Google ScholarDigital Library
- Yang Yuan and Yao Guo, "CMCD: Count Matrix based Code Clone Detection". National Engineering Research Center for Software Engineering, Peking Universiy, Beijing 100871, ChinaGoogle Scholar
- Satwinder Singh and K.S Kahlon, "Effectiveness of refactoring metrics model to identify smelly and error prone classes in open source software" ACM SIGSOFT Software Engineering Notes Volume 37 Issue 2, March 2012.Google Scholar
- Pavitdeep Singh, Satwinder Singh and Jatinder Kaur, "Tool for generating code metrics for C# source code using abstract syntax tree technique", ACM SIGSOFT Software Engineering Notes Volume 38 Issue 5, September 2013.Google Scholar
- Satwinder Singh, Puneet Mittal and K.S Kahlon, "Empirical model for predicting high, medium and low severity faults using object oriented metrics in Mozilla Firefox", International Journal of Computer Applications in Technology Volume 47 Issue 2/3, June 2013.Google ScholarDigital Library
- Satwinder Singh and K.S. Kahlon, "Effectiveness of encapsulation and object-oriented metrics to refactor code and identify error prone classes using bad smells", ACM SIGSOFT Software Engineering Notes Volume 36 Issue 5, September 2011.Google Scholar
Index Terms
- Clone detection in software source code using operational similarity of statements
Recommendations
Incremental Code Clone Detection: A PDG-based Approach
WCRE '11: Proceedings of the 2011 18th Working Conference on Reverse EngineeringIt has been noted in recent years that the presence of code clones makes software maintenance more difficult. Unintended code inconsistencies may occur due to the presence of code clones. In order to avoid problems caused by code clones, it is necessary ...
Prioritizing code clone detection results for clone management
IWSC '13: Proceedings of the 7th International Workshop on Software ClonesClone detection through tools is a common practice in the software industry. Associated with clone detection is code clone management, which includes taking informed decisions for management of the large sets of clones as reported by the clone detection ...
Intelligent token-based code clone detection system for large scale source code
RACS '19: Proceedings of the Conference on Research in Adaptive and Convergent SystemsA code clone refers to code fragments in the source code that are identical or similar to each other. Code clones lead difficulties in software maintenance, bug fixing, present poor design and increase the system size. Code clone detection techniques ...
Comments