if (Op.COUNT) Op.nofinstances ++;
ChildOp op = new ChildOp(type);
op.setChild(branch);
op.next = next;
return op;
if (Op.COUNT) Op.nofinstances ++;
ChildOp op = new ChildOp(Op.INDEPENDENT);
op.setChild(branch);
op.next = next;
return op;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java
|
Method name: ChildOp createLook(int, Op, Op)
|
|
Method name: ChildOp createIndependent(Op, Op)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (Op.COUNT) Op.nofinstances ++;↵ | | 1 | if (Op.COUNT) Op.nofinstances ++;↵
|
2 | ChildOp op = new ChildOp(type);↵ | | 2 | ChildOp op = new ChildOp(Op.INDEPENDENT);↵
|
3 | op.setChild(branch);↵ | | 3 | op.setChild(branch);↵
|
4 | op.next = next;↵ | | 4 | op.next = next;↵
|
5 | return op; | | 5 | return op;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 0.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (Op.COUNT) | | 1 | if (Op.COUNT) |
2 | | | 2 | |
3 | ChildOp op = new ChildOp(type); | | 3 | ChildOp op = new ChildOp(Op.INDEPENDENT); |
4 | op.setChild(branch); | | 4 | op.setChild(branch); |
5 | op.next = next; | | 5 | op.next = next; |
6 | return op; | | 6 | return op; |
Precondition Violations (0)
Row |
Violation |