ComputingComputer ScienceKnowledge ReuseProgramming LanguagesSoftware EngineeringSoftware ConstructionSoftware MaintenanceSoftware RefactoringSoftware ReuseAutomated Bug FindingClone DetectionClone RemovalCode Clone DetectionCode Clone ManagementIdentifier RenamingIntegrated Development EnvironmentsRefactoring Detection
Programmers often copy and paste code so that they can reuse the existing code to complete a similar task. Many times, modifications to the newly pasted code include renaming all instances of an identifier, such as a variable name, consistently throughout the fragment. When these modifications are done manually, undetected inconsistencies and errors can result in the code, for example, a single instance can be missed and mistakenly not renamed. To help programmers avoid making this type of copy-paste error, we created a tool, named CReN, to provide tracking and identifier renaming support within copy-and-paste clones in an integrated development environment (IDE). CReN tracks the code clones involved when copying and pasting occurs in the IDE and infers a set of rules based on the relationships between the identifiers in these code fragments. These rules capture the programmer's intentions, for example, that a particular group of identifiers should be renamed consistently together. Programmers can also provide feedback to improve the accuracy of the inferred rules by specifying that a particular instance of an identifier is to be renamed separately. We introduce our CReN tool, which is implemented as an Eclipse plug-in in Java.
6
Bug isolation via remote program sampling
Ben Liblit, Alex Aiken, Alice X. Zheng et al. · ACM SIGPLAN Notices · 2003 · 510 citations
CP-Miner: a tool for finding copy-paste and related bugs in operating system code
Zhenmin Li, Shan Lu, Suvda Myagmar et al. · 2004 · 335 citations
Bug isolation via remote program sampling
Ben Liblit, Alex Aiken, Alice X. Zheng et al. · 2003 · 240 citations
Context-based detection of clone-related bugs
Lingxiao Jiang, Zhendong Su, Edwin Kwan-Yeung Chiu · 2007 · 202 citations · Full text