Managing clones using dynamic change tracking and resolution: helping developers to cope with changing clone fragments

By many, code cloning is nowadays recognized as a threat to the maintainability of source code. Many clone detection strategies have been proposed and a considerable number of removal strategies, mostly based on refactoring techniques, has been shown. However, recent research has showed that clones can often not be removed easily and other strategies, based on clone management need to be developed. In this thesis, a clone management strategy based on dynamic inferring of clone relations based on monitored clipboard activity is described. A tool is introduced that is able to track live changes to clones and offers several resolution strategies for inconsistently modified clones. The adequacy, usability and effectiveness of this Eclipse plug-in have been studied in an experiment, the results of which show that developers actually do see the added value of such a tool but have very strict requirements with respect to its usability.

[1]  Jeffrey G. Gray,et al.  Visualization of clone detection results , 2006, ETX.

[2]  Kent Beck,et al.  Contributing to Eclipse - principles, patterns, and plug-ins , 2003, The Eclipse series.

[3]  J. Howard Johnson,et al.  Identifying redundancy in source code using fingerprints , 1993, CASCON.

[4]  Leslie Lamport,et al.  Time, clocks, and the ordering of events in a distributed system , 1978, CACM.

[5]  Jens Krinke,et al.  A Study of Consistent and Inconsistent Changes to Code Clones , 2007, 14th Working Conference on Reverse Engineering (WCRE 2007).

[6]  B. Boehm Software risk management: principles and practices , 1991, IEEE Software.

[7]  Miryung Kim,et al.  An empirical study of code clone genealogies , 2005, ESEC/FSE-13.

[8]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[9]  Michael W. Godfrey,et al.  Aiding comprehension of cloning through categorization , 2004 .

[10]  Václav Rajlich,et al.  Removing clones from the code , 1999, J. Softw. Maintenance Res. Pract..

[11]  Andrew Begel,et al.  Managing Duplicated Code with Linked Editing , 2004, 2004 IEEE Symposium on Visual Languages - Human Centric Computing.

[12]  Leon Moonen,et al.  Generating robust parsers using island grammars , 2001, Proceedings Eighth Working Conference on Reverse Engineering.

[13]  Daqing Hou,et al.  CReN: a tool for tracking copy-and-paste code clones and renaming identifiers consistently in the IDE , 2007, eclipse '07.

[14]  Michael W. Godfrey,et al.  "Cloning Considered Harmful" Considered Harmful , 2006, 2006 13th Working Conference on Reverse Engineering.

[15]  Suzanne Robertson,et al.  Mastering the Requirements Process , 1999 .

[16]  Shinji Kusumoto,et al.  Gemini: maintenance support environment based on code clone analysis , 2002, Proceedings Eighth IEEE Symposium on Software Metrics.

[17]  Amela Karahasanovic,et al.  A survey of controlled experiments in software engineering , 2005, IEEE Transactions on Software Engineering.

[18]  Hagen Hagen Is Cloned Code more stable than Non-Cloned Code? , 2008 .

[19]  James R. Cordy,et al.  Comprehending reality - practical barriers to industrial adoption of software maintenance automation , 2003, 11th IEEE International Workshop on Program Comprehension, 2003..

[20]  Susan Horwitz,et al.  Using Slicing to Identify Duplication in Source Code , 2001, SAS.

[21]  Giuliano Antoniol,et al.  Comparison and Evaluation of Clone Detection Tools , 2007, IEEE Transactions on Software Engineering.

[22]  C. A. R. Hoare,et al.  The emperor's old clothes , 1981, CACM.

[23]  Philip J. Guo,et al.  Opportunistic programming: how rapid ideation and prototyping occur in practice , 2008, WEUSE@ICSE.

[24]  Chanchal K. Roy,et al.  A Survey on Software Clone Detection Research , 2007 .

[25]  Rainer Koschke,et al.  Clone Detection Using Abstract Syntax Suffix Trees , 2006, 2006 13th Working Conference on Reverse Engineering.

[26]  Eric Clayberg,et al.  Eclipse: Building Commercial-Quality Plug-ins , 2004 .

[27]  Zoltán Ádám Mann,et al.  Three public enemies: cut, copy, and paste , 2006, Computer.

[28]  Lerina Aversano,et al.  How Clones are Maintained: An Empirical Study , 2007, 11th European Conference on Software Maintenance and Reengineering (CSMR'07).

[29]  Thomas D. LaToza,et al.  Maintaining mental models: a study of developer work habits , 2006, ICSE.

[30]  Steven Holzner Eclipse cookbook , 2004 .

[31]  Miryung Kim,et al.  An ethnographic study of copy and paste programming practices in OOPL , 2004, Proceedings. 2004 International Symposium on Empirical Software Engineering, 2004. ISESE '04..

[32]  Miryung Kim,et al.  SoftGUESS: Visualization and Exploration of Code Clones in Context , 2007, 29th International Conference on Software Engineering (ICSE'07).

[33]  Shinji Kusumoto,et al.  CCFinder: A Multilinguistic Token-Based Code Clone Detection System for Large Scale Source Code , 2002, IEEE Trans. Software Eng..

[34]  Elmar Jürgens,et al.  Static Bug Detection Through Analysis of Inconsistent Clones , 2008, Software Engineering.

[35]  Martin Fowler,et al.  Patterns of Enterprise Application Architecture , 2002 .

[36]  Ettore Merlo,et al.  Assessing the benefits of incorporating function clone detection in a development process , 1997, 1997 Proceedings International Conference on Software Maintenance.

[37]  Ettore Merlo,et al.  Experiment on the automatic detection of function clones in a software system using metrics , 1996, 1996 Proceedings of International Conference on Software Maintenance.

[38]  I. Wilmut,et al.  Viable offspring derived from fetal and adult mammalian cells , 1997, Nature.

[39]  Peter Weiner,et al.  Linear Pattern Matching Algorithms , 1973, SWAT.

[40]  Michel Wermelinger,et al.  Assessing the effect of clones on changeability , 2008, 2008 IEEE International Conference on Software Maintenance.

[41]  Sebastian Jekutsch ElectroCodeoGram: An Environment for Studying Programming , 2006 .

[42]  Arie van Deursen,et al.  On the use of clone detection for identifying crosscutting concern code , 2005, IEEE Transactions on Software Engineering.

[43]  Brenda S. Baker,et al.  On finding duplication and near-duplication in large software systems , 1995, Proceedings of 2nd Working Conference on Reverse Engineering.

[44]  Arie Deursen The leap year problem , 1998 .

[45]  Earl R. Babbie,et al.  The practice of social research , 1969 .

[46]  Walter F. Tichy,et al.  Should Computer Scientists Experiment More? , 1998, Computer.

[47]  E. Menzel Animal Tool Behavior: The Use and Manufacture of Tools by Animals, Benjamin B. Beck. Garland STPM Press, New York and London (1980), 306, Price £24.50 , 1981 .

[48]  B. Beck Animal Tool Behavior: The Use and Manufacture of Tools by Animals , 1980 .

[49]  Martin P. Robillard,et al.  Clonetracker: tool support for code clone management , 2008, ICSE '08.

[50]  Neil Davey,et al.  The development of a software clone detector , 1995 .

[51]  Rainer Koschke Identifying and Removing Software Clones , 2008, Software Evolution.

[52]  Magdalena Balazinska,et al.  Measuring clone based reengineering opportunities , 1999, Proceedings Sixth International Software Metrics Symposium (Cat. No.PR00403).

[53]  F. P. Brooks,et al.  Grasping reality through illusion—interactive graphics serving science , 1988, CHI '88.

[54]  Brenda S. Baker,et al.  A Program for Identifying Duplicated Code , 1992 .

[55]  Stanley M. Sutton,et al.  Multi-Dimensional Separation of Concerns , 1999 .

[56]  P. Kidwell,et al.  The mythical man-month: Essays on software engineering , 1996, IEEE Annals of the History of Computing.