Cargando…

Historical perspective of code clone refactorings in evolving software

Cloning in software is generally perceived as a threat to its maintenance and that is why it needs to be managed properly. Understanding clones from a historical perspective is essential for effective clone management. Analysis of code refactorings performed on clones in previous releases will help...

Descripción completa

Detalles Bibliográficos
Autores principales: Kanwal, Jaweria, Maqbool, Onaiza, Basit, Hamid Abdul, Sindhu, Muddassar Azam, Inoue, Katsuro
Formato: Online Artículo Texto
Lenguaje:English
Publicado: Public Library of Science 2022
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9714808/
https://www.ncbi.nlm.nih.gov/pubmed/36454895
http://dx.doi.org/10.1371/journal.pone.0277216
_version_ 1784842312051851264
author Kanwal, Jaweria
Maqbool, Onaiza
Basit, Hamid Abdul
Sindhu, Muddassar Azam
Inoue, Katsuro
author_facet Kanwal, Jaweria
Maqbool, Onaiza
Basit, Hamid Abdul
Sindhu, Muddassar Azam
Inoue, Katsuro
author_sort Kanwal, Jaweria
collection PubMed
description Cloning in software is generally perceived as a threat to its maintenance and that is why it needs to be managed properly. Understanding clones from a historical perspective is essential for effective clone management. Analysis of code refactorings performed on clones in previous releases will help developers in taking decisions about clone refactoring in future releases. In this paper we perform a longitudinal study on the evolution of clone refactorings in various versions of five software systems. To perform a systematic study on clone refactoring evolution, we define clone evolution patterns for studying refactorings in a formal notation. Our results show that only a small proportion of code clones are refactored between the versions and most of the refactorings are inconsistent within clone classes. Moreover, clone refactorings may cause clone removal. Analysis of the source code of refactored clones reveals similar reasons of inconsistent refactorings and clone removal for five Java systems. This analysis will help in devising appropriate strategies for managing clone refactorings in software and hence provide foundation for devising better clone management tools.
format Online
Article
Text
id pubmed-9714808
institution National Center for Biotechnology Information
language English
publishDate 2022
publisher Public Library of Science
record_format MEDLINE/PubMed
spelling pubmed-97148082022-12-02 Historical perspective of code clone refactorings in evolving software Kanwal, Jaweria Maqbool, Onaiza Basit, Hamid Abdul Sindhu, Muddassar Azam Inoue, Katsuro PLoS One Research Article Cloning in software is generally perceived as a threat to its maintenance and that is why it needs to be managed properly. Understanding clones from a historical perspective is essential for effective clone management. Analysis of code refactorings performed on clones in previous releases will help developers in taking decisions about clone refactoring in future releases. In this paper we perform a longitudinal study on the evolution of clone refactorings in various versions of five software systems. To perform a systematic study on clone refactoring evolution, we define clone evolution patterns for studying refactorings in a formal notation. Our results show that only a small proportion of code clones are refactored between the versions and most of the refactorings are inconsistent within clone classes. Moreover, clone refactorings may cause clone removal. Analysis of the source code of refactored clones reveals similar reasons of inconsistent refactorings and clone removal for five Java systems. This analysis will help in devising appropriate strategies for managing clone refactorings in software and hence provide foundation for devising better clone management tools. Public Library of Science 2022-12-01 /pmc/articles/PMC9714808/ /pubmed/36454895 http://dx.doi.org/10.1371/journal.pone.0277216 Text en © 2022 Kanwal et al https://creativecommons.org/licenses/by/4.0/This is an open access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/) , which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
spellingShingle Research Article
Kanwal, Jaweria
Maqbool, Onaiza
Basit, Hamid Abdul
Sindhu, Muddassar Azam
Inoue, Katsuro
Historical perspective of code clone refactorings in evolving software
title Historical perspective of code clone refactorings in evolving software
title_full Historical perspective of code clone refactorings in evolving software
title_fullStr Historical perspective of code clone refactorings in evolving software
title_full_unstemmed Historical perspective of code clone refactorings in evolving software
title_short Historical perspective of code clone refactorings in evolving software
title_sort historical perspective of code clone refactorings in evolving software
topic Research Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9714808/
https://www.ncbi.nlm.nih.gov/pubmed/36454895
http://dx.doi.org/10.1371/journal.pone.0277216
work_keys_str_mv AT kanwaljaweria historicalperspectiveofcodeclonerefactoringsinevolvingsoftware
AT maqboolonaiza historicalperspectiveofcodeclonerefactoringsinevolvingsoftware
AT basithamidabdul historicalperspectiveofcodeclonerefactoringsinevolvingsoftware
AT sindhumuddassarazam historicalperspectiveofcodeclonerefactoringsinevolvingsoftware
AT inouekatsuro historicalperspectiveofcodeclonerefactoringsinevolvingsoftware