Abstract
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.
Funder
Higher Education Commision, Pakistan
Prince Sultan University, Riyadh, Saudi Arabia
Publisher
Public Library of Science (PLoS)
Reference44 articles.
1. Roy C, Zibran M, Koschke R. The vision of software clone management: past present and future. In: Proceedings of Software Evolution Week Conference on Software Maintenance, Reengineering and Reverse Engineering. IEEE; 2014. p. 18–33.
2. Kim M, Sazawal V, Notkin D, Murphy G. An empirical study of code clone genealogies. In: ACM SIGSOFT Software Engineering Notes. ACM; 2005. p. 187–196.
3. Predicting change consistency in a clone group;F Zhang;Journal of Systems and Software,2017
4. A survey on software clone detection research;C Roy;Queens School of Computing,2007
5. Yoshida N, Higo Y, Kamiya T, Kusumoto S, Inoue K. On refactoring support based on code clone dependency relation. In: 11th IEEE International Software Metrics Symposium (METRICS’05). IEEE; 2005. p. 10–pp.