Some strategies of reuse in an object-oriented programming environment
CHI '89 Proceedings of the SIGCHI Conference on Human Factors in Computing Systems
Computer-aided vs. manual program restructuring
ACM SIGSOFT Software Engineering Notes
Techniques for automatically correcting words in text
ACM Computing Surveys (CSUR)
Automated assistance for program restructuring
ACM Transactions on Software Engineering and Methodology (TOSEM)
The reuse of uses in Smalltalk programming
ACM Transactions on Computer-Human Interaction (TOCHI)
Context-sensitive learning methods for text categorization
ACM Transactions on Information Systems (TOIS)
Smarter cut-and-paste for programming text editors
AUIC '01 Proceedings of the 2nd Australasian conference on User interface
Bunch: A Clustering Tool for the Recovery and Maintenance of Software System Structures
ICSM '99 Proceedings of the IEEE International Conference on Software Maintenance
Lightweight structure in text
Software Clustering based on Information Loss Minimization
WCRE '03 Proceedings of the 10th Working Conference on Reverse Engineering
An Ethnographic Study of Copy and Paste Programming Practices in OOPL
ISESE '04 Proceedings of the 2004 International Symposium on Empirical Software Engineering
A Study of Evolution in the Presence of Source-Derived Partial Design Representations
IWPSE '04 Proceedings of the Principles of Software Evolution, 7th International Workshop
Using structural context to recommend source code examples
Proceedings of the 27th international conference on Software engineering
Using a clone genealogy extractor for understanding and supporting evolution of code clones
MSR '05 Proceedings of the 2005 international workshop on Mining software repositories
Hi-index | 0.00 |
Creating and editing source code are tedious and error-prone processes. One important source of errors in editing programs is the failure to correctly adapt a block of copied code to a new context. This occurs because several dependencies to the surrounding code usually need to be adapted for the new context and it is easy to forget one of them. Conversely, this also makes such errors hard to find. This paper presents a new method for identifying some common types of errors in cut, copy and paste operations. The method analyzes the context of the original block of code and tries to match it with the context in the new location. It utilizes a simple, pattern-based model of context, which we found to be well suited to the analysis of relocated blocks of text. Furthermore, we discuss the ability of our technique to detect semantic errors. While semantic errors are relatively difficult to recognize in a static document, our new technique can infer important information from the original context to detect some semantic mismatches. Finally, we present a proof-of-concept implementation and discuss our simple user interface for context-sensitive cut, copy and paste.