Code Clones in Rhino: A Case Study

Matthew D. Beard, Nicholas A. Kraft, and Letha H. Etzkorn

Keywords

Software Engineering, Program Comprehension, Code Clones, Software Metrics

Abstract

Programmers frequently create duplicate pieces of code in software projects by copying and pasting, either literally or logically. Such duplication may appear worthwhile, as it allows code to be reused; however, these copied code fragments, generally referred to as clones, can cause severe problems for software maintainers. When code must be changed, the existence of clones may result in an instance of a clone being properly fixed, while another instance remains faulty. In this study, we examine several versions of Rhino, an open source implementation of JavaScript written in Java, and determine that the cloning phenomenon is present within this software. We consider clone evolution – the changes observed in clones between each version of a software system. In addition, we consider the relevancy of certain common software metrics, such as the Chidamber & Kemerer suite, in predicting the existence of clones within software. We demonstrate that a correlation exists between certain metrics through the use of multiple linear regression.

Important Links:



Go Back