if (iterator == null)
{
list.remove(index - 1);
}
else
{
iterator.remove();
}
if (values == null)
{
++valueListIndex;
}
else
{
values.next();
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreUtil.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EContentsEList.java
|
Method name: void remove()
|
|
Method name: boolean hasNext()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (iterator == null)↵ | | 1 | if (values == null)↵
|
2 | {↵ | | 2 | {↵
|
3 | list.remove(index - 1);↵ | | 3 | ↵
|
| | | 4 | ++valueListIndex;↵
|
4 | }↵ | | 5 | }↵
|
5 | else↵ | | 6 | else↵
|
6 | {↵ | | 7 | {↵
|
7 | iterator.remove();↵ | | 8 | ↵
|
| | | 9 | values.next();↵
|
8 | } | | 10 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (iterator == null) | | 8 | if (values == null) |
2 | | | | |
| | | | |
3 | | | | |
| | | 10 | |
| | | 9 | |
Precondition Violations (1)
Row |
Violation |
1 | Type java.util.Iterator<org.eclipse.emf.ecore.EStructuralFeature.Setting> of variable iterator does not match with type java.util.ListIterator<E> of variable values |