Exploring the design space of proactive tool support for copy-and-paste programming

Programmers copy and paste code for various reasons, leaving similar code fragments (clones) in the software systems. As a result, they must spend effort and attention in tracking, understanding, and correctly adapting and evolving clones. Ideally, an integrated environment should be used to fully and seamlessly assist programmers in all these activities. Unlike clone-detection-based tools, such environments should support and manage clones proactively as clones are created and evolved. In this paper, an initial design space for such environments is sketched based on our experience with a prototype named CnP. The features and design decisions taken in CnP as well as remaining design problems are identified. To assess the potential of the developed features and identify new design input, code clones in several real-world systems are examined, and their implications on the design (and redesign) of proactive clone tools are discussed.

[1]  Robert J. Walker,et al.  Determining detailed structural correspondence for generalization tasks , 2007, ESEC-FSE '07.

[2]  Martin P. Robillard,et al.  Tracking Code Clones in Evolving Software , 2007, 29th International Conference on Software Engineering (ICSE'07).

[3]  Ferosh Jacob,et al.  CnP: Towards an environment for the proactive management of copy-and-paste programming , 2009, 2009 IEEE 17th International Conference on Program Comprehension.

[4]  Yuanyuan Zhou,et al.  CP-Miner: A Tool for Finding Copy-paste and Related Bugs in Operating System Code , 2004, OSDI.

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

[6]  Michael W. Godfrey,et al.  Improved tool support for the investigation of duplication in software , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

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

[8]  Kostas Kontogiannis Managing Known Clones: Issues and Open Questions , 2006, Duplication, Redundancy, and Similarity in Software.

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

[10]  Amy J. Ko,et al.  Eliciting design requirements for maintenance-oriented IDEs: a detailed study of corrective and perfective maintenance tasks , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[11]  Rob Miller,et al.  Interactive Simultaneous Editing of Multiple Text Regions , 2001, USENIX ATC, General Track.

[12]  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..

[13]  Rainer Koschke,et al.  Survey of Research on Software Clones , 2006, Duplication, Redundancy, and Similarity in Software.

[14]  Robert J. Walker,et al.  Semi-automating small-scale source code reuse via structural correspondence , 2008, SIGSOFT '08/FSE-16.

[15]  Harald C. Gall,et al.  Change Distilling:Tree Differencing for Fine-Grained Source Code Change Extraction , 2007, IEEE Transactions on Software Engineering.

[16]  Michael W. Godfrey,et al.  “Cloning considered harmful” considered harmful: patterns of cloning in software , 2008, Empirical Software Engineering.

[17]  A. Karimi,et al.  Master‟s thesis , 2011 .

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

[19]  Zhendong Su,et al.  Context-based detection of clone-related bugs , 2007, ESEC-FSE '07.

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