All ETDs from UAB

Advisory Committee Chair

Barrett Bryant

Advisory Committee Members

Jeffrey Gray

Nicholas Kraft

Marjan Mernik

Brian Toone

Chengcui Zhang

Document Type

Dissertation

Date of Award

2010

Degree Name by School

Doctor of Philosophy (PhD) College of Arts and Sciences

Abstract

The existence of code cloning, which represents identical or near identical sections of code, has been documented to occur frequently in software systems. The main purpose of cloning is the reuse of a code fragment that performs some functionality by copying and pasting it to a new location in the source code. Code clones embody a unique form of coupling, because their similarity inadvertently connects their representative sections of code together. This inherent duplication requires attention to be given to all related duplicates, even if just one of these duplicates is being evaluated or changed. Failure to consider all related clones when maintaining cloned code can result in errors that are difficult to identify initially. The introduction of clone detection tools in recent years has provided an automated means to discover clones in code. However, in order to maintain these clones, programmers must first understand the properties of the clones reported by such tools, which in many cases are comprised of clone groups (i.e., clones representing the same duplication) scattered throughout the collection of source files that in turn are contained in reports consisting of a large amount of data. The elimination of the duplication associated with these clones by modularizing the code through refactoring activities reduces the amount of code that needs to be maintained in the future. However, an observed disconnect can still be seen between the detection and analysis of the clones and the subsequent task of eliminating the duplication. This dissertation focuses on supporting two aspects related to the maintenance of code clones: 1) clone comprehension through its representation and analysis, and 2) clone maintenance with a focus on the removal of the duplication associated with the clones. Pertaining to clone comprehension, the research described in this dissertation contributes several novel clone representations that include clone visualization and localized representation techniques. The research also contributes to the understanding of clones through clone analysis associated with the discovery of higher level relationships among clone groups and the observed relationships between clones reported by a clone detection tool and actual historic refactorings in software artifacts. Pertaining to the second aspect, the research contributes to a more unified process where the phases of clone maintenance with a focus on clone removal (i.e., detection, analysis, and refactoring) are streamlined together within the programmer's working environment. This new process removes tasks that previously required manual intervention.

Share

COinS
 
 

To view the content in your browser, please download Adobe Reader or, alternately,
you may Download the file to your hard drive.

NOTE: The latest versions of Adobe Reader do not support viewing PDF files within Firefox on Mac OS and if you are using a modern (Intel) Mac, there is no official plugin for viewing PDF files within the browser window.