Understanding the Evolution of Code Clones in Software Systems
Code cloning is a common practice in software development. However, code cloning has both positive aspects such as accelerating the development process and negative aspects such as causing code bloat. After a decade of active research, it is clear that removing all of the clones from a software system is not desirable. Therefore, it is better to manage clones than to remove them. A software system can have thousands of clones in it, which may serve multiple purposes. However, some of the clones may cause unwanted management difficulties and clones like these should be refactored. Failure to manage clones may cause inconsistencies in the code, which is prone to error. Managing thousands of clones manually would be a difficult task. A clone management system can help manage clones and find patterns of how clones evolve during the evolution of a software system. In this research, we propose a framework for constructing and visualizing clone genealogies with change patterns (e.g., inconsistent changes), bug information, developer information and several other important metrics in a software system. Based on the framework we design and build an interactive prototype for a multi-touch surface (e.g., an iPad). The prototype uses a variety of techniques to support understanding clone genealogies, including: identifying and providing a compact overview of the clone genealogies along with their key characteristics; providing interactive navigation of genealogies, cloned source code and the differences between clone fragments; providing the ability to filter and organize genealogies based on their properties; providing a feature for annotating clone fragments with comments to aid future review; and providing the ability to contact developers from within the system to find out more information about specific clones. To investigate the suitability of the framework and prototype for investigating and managing cloned code, we elicit feedback from practicing researchers and developers, and we conduct two empirical studies: a detailed investigation into the evolution of function clones and a detailed investigation into how clones contribute to bugs. In both empirical studies we are able to use the prototype to quickly investigate the cloned source code to gain insights into clone use. We believe that the clone management system and the findings will play an important role in future studies and in managing code clones in software systems.
DegreeMaster of Science (M.Sc.)
SupervisorSchneider, Kevin A.
CommitteeMcCalla, Gord; Roy, Chanchal K.; Wahid, Khan A.
Copyright DateAugust 2013
software maintenance, code clones, clone evolution, clone management, clone visualization, bug
Showing items related by title, author, creator and subject.
Mondal, Manishankar 1982- (2017-02-15)Code clones (identical or similar code fragments in a code-base) have dual but contradictory impacts (i.e., both positive and negative impacts) on the evolution and maintenance of a software system. Because of the negative ...
Cloning, expression, and purification of the Drosophila melanogaster dosage compensation complex chromodomains and their Homo sapiens orthologues Welham, Andrew James (2009)Sexual differentiation is a fundamental characteristic of all eukaryotes, dictating sex-specific morphology, physiology and behavior. Diploid organisms with heteromorphic sex chromosomes (XX or XY) require regulatory ...
Asaduzzaman, Muhammad (2012-01-18)Code clones are identical or similar fragments of code in a software system. Simple copy-paste programming practices of developers, reusing existing code fragments instead of implementing from the scratch, limitations of ...