Cut and Paste Detector line numbering offset
Brought to you by:
mikeatkinson,
seguin
Line numbers in the cut and paste detector appear off
by one when highlighted in the jEdit window.
jrefactory says 1270- 1285 but jEdit highlights 1271-1286.
Detected lines appear off in the other direction.
jrefactory
says 1270-1285. But visually the code duplication is
1269- 1284.
I tried the standalone JRefactory and I got the same answer
but no highlighting.
Logged In: YES
user_id=476481
I've corrected the off-by-one error.
Thre are other errors in the CPD that mean that it sometimes
gets the line start/end numbers wrong by lots more than one.
The cut and paste detector is part of PMD that I include
(the PMD part is modified to work with JDK 1.5 and
refactorings). I'll look into whether there are any fixes to
CPD in the PMD CVS that I have not yet included.