Dealing with clones in software : a practical approach from detection towards management
Uddin, Md Sharif
Despite the fact that duplicated fragments of code also called code clones are considered one of the prominent code smells that may exist in software, cloning is widely practiced in industrial development. The larger the system, the more people involved in its development and the more parts developed by different teams result in an increased possibility of having cloned code in the system. While there are particular benefits of code cloning in software development, research shows that it might be a source of various troubles in evolving software. Therefore, investigating and understanding clones in a software system is important to manage the clones efficiently. However, when the system is fairly large, it is challenging to identify and manage those clones properly. Among the various types of clones that may exist in software, research shows detection of near-miss clones where there might be minor to significant differences (e.g., renaming of identifiers and additions/deletions/modifications of statements) among the cloned fragments is costly in terms of time and memory. Thus, there is a great demand of state-of-the-art technologies in dealing with clones in software. Over the years, several tools have been developed to detect and visualize exact and similar clones. However, usually the tools are standalone and do not integrate well with a software developer's workflow. In this thesis, first, a study is presented on the effectiveness of a fingerprint based data similarity measurement technique named 'simhash' in detecting clones in large scale code-base. Based on the positive outcome of the study, a time efficient detection approach is proposed to find exact and near-miss clones in software, especially in large scale software systems. The novel detection approach has been made available as a highly configurable and fully fledged standalone clone detection tool named 'SimCad', which can be configured for detection of clones in both source code and non-source code based data. Second, we show a robust use of the clone detection approach studied earlier by assembling its detection service as a portable library named 'SimLib'. This library can provide tightly coupled (integrated) clone detection functionality to other applications as opposed to loosely coupled service provided by a typical standalone tool. Because of being highly configurable and easily extensible, this library allows the user to customize its clone detection process for detecting clones in data having diverse characteristics. We performed a user study to get some feedback on installation and use of the 'SimLib' API (Application Programming Interface) and to uncover its potential use as a third-party clone detection library. Third, we investigated on what tools and techniques are currently in use to detect and manage clones and understand their evolution. The goal was to find how those tools and techniques can be made available to a developer's own software development platform for convenient identification, tracking and management of clones in the software. Based on that, we developed a clone-aware software development platform named 'SimEclipse' to promote the practical use of code clone research and to provide better support for clone management in software. Finally, we evaluated 'SimEclipse' by conducting a user study on its effectiveness, usability and information management. We believe that both researchers and developers would enjoy and utilize the benefit of using these tools in different aspect of code clone research and manage cloned code in software systems.
DegreeMaster of Science (M.Sc.)
SupervisorRoy, Chanchal K.; Schneider, Kevin A.
CommitteeGutwin, Carl; Jamali, Nadeem; Saadt-Mehr, Aryan
Copyright DateFebruary 2014
Integrated Clone Management
Clone Management Plugin
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 ...