Please use this identifier to cite or link to this item: http://hdl.handle.net/123456789/16134
Title: Understanding Software Evolution through Clones Analysis
Authors: Kanwal, Jaweria
Keywords: Computer Sciences
Issue Date: 2021
Publisher: Quaid-i-Azam University
Abstract: Software systems change with the ever changing environment. To mitigate the negative impact of change, and keep the software understandable during its evolution is perhaps the most challenging aspect in a software’s lifetime. The change in software development methods and introduction of the software reuse approach has led to the phenomenon of software cloning. Clones in software represent similar program structures, and have benefits as well as drawbacks. Cloning poses a paradoxical behavior for software development. It facilitates software reuse where traditional reuse approaches cannot be applied. On the other hand it increases maintenance cost and carries a risk of bug propagation. Recent research on code clones reveals that removal of clones may not be appropriate and thus focus has shifted to clone analysis and management. Clone analysis is required to categorize clones for different maintenance solutions such as which clones can be beneficial for reuse and which clones may need refactoring. Proper clone analysis is required to understand the impact of cloning on software quality. To benefit from the positive aspects of clones such as reuse, understanding code clone structures instead of simple clones (code fragment level) is more useful. Structural clones (recurring patterns of simple clones) represent software design level similarities which may support reuse at a higher level. In this research, we formally define structural clones so that a framework can be established for studying them. Based on this definition, various types of higher granularity level clones can be defined to perform different types of analysis. Understanding evolutionary perspective of clones is essential for effective clone man agement. A study of software clone evolution serves the purpose of understanding the maintenance implications of clones, which leads to their appropriate management. Although the evolution of simple clones has been studied by researchers, the evolution of structural clones is still to be explored. In this work, we study the evolution of structural clones through two approaches: Genealogy (direct) and metrics based (indirect) approach. To perform a genealogy based study of structural clones, we formally define structural clone evolution patterns. We also define clone metrics to understand the software clone characteristics during its evolution. We perform a longitudinal study of structural clone evolution on five Java systems. Our results show that structural clones are more likely to change inconsistently, however, less frequently than simple clones. Analysis of structural clone evolution reveals similar reasons for changes, and similar trends in evolution patterns, for all the five subject systems. These trends reveal evolutionary characteristics of structural clones that can help in devising appropriate strategies for managing them, hence devising better clone management systems. Another important management activity regarding clones is clone refactoring. Clones that are hindering software evolvability need to be refactored. To help developers in making better refactoring decisions during clone management, clone refactorings need to be analyzed from a historical perspective. Past experiences of clone refactorings will guide developers in future releases. We perform a longitudinal study on the evolution of clone refactorings in different software releases. To perform a systematic study on clone refactoring evolution, we formally define clone evolution patterns for refactorings. Our results show that developers perform refactorings on a small proportion of code clones and most of the refactorings are inconsistent. Analysis of the source code of refactored clones reveals similar reasons of inconsistent refactorings and clone removal, thus leading to better understanding of refactoring for future refactoring tasks. To make the evolution and refactoring study results helpful in a real development en vironment, we develop a tool that detects and visualizes clone genealogies. This will help maintainers in identifying and managing clones during their maintenance tasks. Evaluation of our tool through a user study reveals the practical benefits of our work. Our work on evolution and refactoring concepts and analysis of clones is expected to be helpful for researchers in building and comparing approaches for clone analysis. Detection of clones and clone statistics will guide software practitioners in taking appropriate decisions for clones during software development and maintenance. Thus this dissertation contributes to understanding and supporting evolution of software through an analysis of software clones both theoretically and practically.
URI: http://hdl.handle.net/123456789/16134
Appears in Collections:Ph.D

Files in This Item:
File Description SizeFormat 
COM 2377.pdfCOM 23772.81 MBAdobe PDFView/Open


Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.