if (prepared > 1 || hasNext())
{
++cursor;
prepared = 0;
feature = preparedFeature;
E result = preparedResult;
hasNext();
return result;
}
else
{
throw new NoSuchElementException();
}
if (prepared < -1 || hasPrevious())
{
--cursor;
prepared = 0;
feature = preparedFeature;
E result = preparedResult;
hasPrevious();
return result;
}
else
{
throw new NoSuchElementException();
}
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: E next()
|
|
Method name: E previous()
|
Number of AST nodes: 8
|
|
Number of AST nodes: 8
|
|
1 | if (prepared > 1 || hasNext())↵ | | 1 | if (prepared < -1 || hasPrevious())↵
|
2 | {↵ | | 2 | {↵
|
3 | ++cursor;↵ | | 3 | --cursor;↵
|
4 | prepared = 0;↵ | | 4 | prepared = 0;↵
|
5 | feature = preparedFeature;↵ | | 5 | feature = preparedFeature;↵
|
6 | E result = preparedResult;↵ | | 6 | E result = preparedResult;↵
|
7 | hasNext();↵ | | 7 | hasPrevious();↵
|
8 | return result;↵ | | 8 | return result;↵
|
9 | }↵ | | 9 | }↵
|
10 | else↵ | | 10 | else↵
|
11 | {↵ | | 11 | {↵
|
12 | throw new NoSuchElementException();↵ | | 12 | throw new NoSuchElementException();↵
|
13 | } | | 13 | }
|
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 1 |