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 and functional analysis of the genes from entomopathogenic fungi involved in the biosynthesis of eicosatetraenoic acid (ETA) Tan, Li C (2010-06)Very long chain polyunsaturated fatty acids (VLCPUFAs) such as arachidonic acid (ARA, 20:4ù6), eicosapentaenoic acid (EPA, 20:5ù3) and docosahexaenoic acid (DHA, 22:6ù3) have been shown to have many health benefits, some ...
Short rotation culture of willow clones across Canada : growth requirements and implications for soil nutrients and greenhouse gas balances Ens, Joel (2012-11-21)The cultivation of willow (Salix spp.) is being investigated as a potential feedstock for biomass energy in the Canadian prairies. For this purpose, and despite willow’s high nutrient and water demand, high rates of ...