if(ring[i] != rem
&& ring[i].hashcode == rem.hashcode
&& ring[i].str.equals(rem.str))
{
// we don't want duplicate
// entries in the kill ring
kill = i;
break;
}
if(offset >= info.offset
&& offset < info.offset + info.length)
{
screenLine = i;
break;
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/KillRing.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/ChunkCache.java
|
Method name: void changed(UndoManager.Remove)
|
|
Method name: int getScreenLineOfOffset(int, int)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if(ring[i] != rem↵ | | 1 | if(↵
|
2 | && ring[i].hashcode == rem.hashcode↵ | | |
|
3 | && ring[i].str.equals(rem.str)↵ | | 2 | offset >= info.offset↵
|
4 | )↵ | | 3 | && offset < info.offset + info.length)↵
|
5 | {↵ | | 4 | {↵
|
6 | // we don't want duplicate↵ | | 5 | ↵
|
7 | // entries in the kill ring↵ | | |
|
8 | kill = i;↵ | | 6 | screenLine = i;↵
|
9 | break;↵ | | 7 | break;↵
|
10 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |