etx

33
CReN: A Tool for Tracking Copy-and-Paste Code Clones and Renaming Identifiers Consistently in the IDE By Patricia Jablonski and Daqing Hou Clarkson University Eclipse Technology Exchange October 21, 2007

Upload: patricia-deshane

Post on 06-Jul-2015

418 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: ETX

CReN: A Tool for Tracking Copy-and-Paste Code Clones and Renaming Identifiers Consistently in the IDE

By

Patricia Jablonskiand Daqing Hou

Clarkson University

Eclipse Technology Exchange

October 21, 2007

Page 2: ETX

Managing Copy-and-Paste

Problem

Copy and paste code

Change some variables

Don’t change all instances

So, have an error

Page 3: ETX
Page 4: ETX
Page 5: ETX
Page 6: ETX
Page 7: ETX
Page 8: ETX
Page 9: ETX
Page 10: ETX
Page 11: ETX
Page 12: ETX
Page 13: ETX
Page 14: ETX
Page 15: ETX
Page 16: ETX
Page 17: ETX
Page 18: ETX
Page 19: ETX
Page 20: ETX
Page 21: ETX
Page 22: ETX
Page 23: ETX
Page 24: ETX
Page 25: ETX
Page 26: ETX
Page 27: ETX
Page 28: ETX
Page 29: ETX
Page 30: ETX
Page 31: ETX

Copy-and-Paste Error Detection and Prevention

CnP: Copy-and-Paste Tool

Tracks & highlights copy-pasted statements

Detects & prevents inconsistencies based on inferences of the programmer’s intention

Identifier renaming inconsistencies CReN: Consistent Renaming Tool

Lexical/naming pattern inconsistencies

Type inconsistencies

Page 32: ETX

Related Work

Clone detection and removal

Clone tracking tools Codelink, CloneTracker

Error detection tools CP-Miner, DECKARD-based tool

Renaming tools Find & Replace, Rename Refactoring, Linked

Renaming

Page 33: ETX

Conclusion

Discussion

How would you evaluate our tool?

How would you improve the tool? Additional features Visualization of clones Programmer’s intention

Questions/Comments