if (eStructuralFeatures == null)
{
if (index < 0 || index > 1)
{
throw new IndexOutOfBoundsException("index=" + index + ", size=0");
}
return FeatureIteratorImpl.emptyIterator();
}
ListIterator<E> result = newNonResolvingListIterator();
for (int i = 0; i < index; ++i)
{
result.next();
}
return result;
if (eStructuralFeatures == null)
{
if (index != 0)
{
throw new IndexOutOfBoundsException("index=" + index + ", size=0");
}
return FeatureIteratorImpl.emptyIterator();
}
ListIterator<E> result = newListIterator();
for (int i = 0; i < index; ++i)
{
result.next();
}
return result;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EContentsEList.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EContentsEList.java
|
Method name: ListIterator basicListIterator(int)
|
|
Method name: ListIterator listIterator(int)
|
Number of AST nodes: 8
|
|
Number of AST nodes: 8
|
|
1 | if (eStructuralFeatures == null)↵ | | 1 | if (eStructuralFeatures == null)↵
|
2 | {↵ | | 2 | {↵
|
3 | if (index < 0 || index > 1)↵ | | 3 | if (index != 0)↵
|
4 | {↵ | | 4 | {↵
|
5 | throw new IndexOutOfBoundsException("index=" + index + ", size=0");↵ | | 5 | throw new IndexOutOfBoundsException("index=" + index + ", size=0");↵
|
6 | }↵ | | 6 | }↵
|
|
7 | return FeatureIteratorImpl.emptyIterator();↵ | | 7 | return FeatureIteratorImpl.emptyIterator();↵
|
8 | }↵ | | 8 | }↵
|
|
9 | ListIterator<E> result = newNonResolvingListIterator();↵ | | 9 | ListIterator<E> result = newListIterator();↵
|
10 | for (int i = 0; i < index; ++i)↵ | | 10 | for (int i = 0; i < index; ++i)↵
|
11 | {↵ | | 11 | {↵
|
12 | result.next();↵ | | 12 | result.next();↵
|
13 | }↵ | | 13 | }↵
|
14 | return result; | | 14 | return result;
|
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 1 |