int size = size();
if (index < 0 || index > size())
throw new IndexOutOfBoundsException("index=" + index + ", size=" + size);
return new EListIterator<E>(index);
int size = size();
if (index < 0 || index > size())
throw new IndexOutOfBoundsException("index=" + index + ", size=" + size);
return new NonResolvingEListIterator<E>(index);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/DelegatingEList.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/DelegatingEList.java
|
Method name: ListIterator listIterator(int)
|
|
Method name: ListIterator basicListIterator(int)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | int size = size();↵ | | 1 | int size = size();↵
|
2 | if (index < 0 || index > size())↵ | | 2 | if (index < 0 || index > size())↵
|
3 | throw new IndexOutOfBoundsException("index=" + index + ", size=" + size);↵ | | 3 | throw new IndexOutOfBoundsException("index=" + index + ", size=" + size);↵
|
|
4 | return new EListIterator<E>(index); | | 4 | return new NonResolvingEListIterator<E>(index);
|
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 8 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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 | int size = size(); | | 1 | int size = size(); |
2 | if (index < 0 || index > size()) | | 2 | if (index < 0 || index > size()) |
3 | throw new IndexOutOfBoundsException("index=" + index + ", size=" + size); | | 3 | throw new IndexOutOfBoundsException("index=" + index + ", size=" + size); |
4 | return new EListIterator<E>(index); | | 4 | return new NonResolvingEListIterator<E>(index); |
Precondition Violations (0)
Row |
Violation |