Three public enemies: cut, copy, and paste

Many software developers know the feeling of desperately debugging a program only to discover after a sleepless night that the error stemmed from copy-pasted code segments that had become inconsistent in subsequent editing. The problems arising from copied code are not new, and many researchers have investigated how to automatically find copied code segments. Given the extensive use of copy-paste operations and their tendency to cause inconsistencies, there is clearly a pressing need to rethink current editor programs. One solution is to replace cut, copy, and paste with operations that correspond directly to the intended semantics behind their use. With these operations, the user can specify semantic relationships among copied objects, and the editor program can use that information to help in the long-term support of those relationships. It would thus avoid the inconsistencies that currently arise from the use of cut, copy, and paste

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

[2]  Stéphane Ducasse,et al.  A language independent approach for detecting duplicated code , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

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

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

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