File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/UndoManager.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/UndoManager.java | |||
Method name: void contentInserted(int, int, String, boolean)
|
Method name: void contentRemoved(int, int, String, boolean)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | Insert ins = new Insert(this,offset,length,text);↵ | 1 | Remove rem = new Remove(this,offset,length,text);↵ | |
2 | if(clearDirty)↵ | 2 | if(clearDirty)↵ | |
3 | {↵ | 3 | {↵ | |
4 | redoClearDirty = last;↵ | 4 | redoClearDirty = last;↵ | |
5 | undoClearDirty = ins;↵ | 5 | undoClearDirty = rem;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if(compoundEdit != null)↵ | 7 | if(compoundEdit != null)↵ | |
8 | compoundEdit.add(ins);↵ | 8 | compoundEdit.add(rem);↵ | |
9 | else↵ | 9 | else↵ | |
10 | addEdit(ins); | 10 | addEdit(rem); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 29 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 3.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13 | Insert ins = new Insert(this, offset, length, text); |
| 18 | Remove rem = new Remove(this, offset, length, text); | |||||||||||||||||||
14 | if (clearDirty) | 19 | if (clearDirty) | ||||||||||||||||||||
15 | redoClearDirty = last; | 20 | redoClearDirty = last; | ||||||||||||||||||||
16 | undoClearDirty = ins; |
| 21 | undoClearDirty = rem; | |||||||||||||||||||
17 | if (compoundEdit != null) | 22 | if (compoundEdit != null) | ||||||||||||||||||||
18 | compoundEdit.add(ins); |
| 23 | compoundEdit.add(rem); | |||||||||||||||||||
else | else | ||||||||||||||||||||||
19 | addEdit(ins); |
| 24 | addEdit(rem); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables rem |