try
{
@SuppressWarnings("unchecked") E previous = (E)BasicEList.this.data[--cursor];
checkModCount();
lastCursor = cursor;
return previous;
}
catch (IndexOutOfBoundsException exception)
{
checkModCount();
throw new NoSuchElementException();
}
try
{
@SuppressWarnings("unchecked") E next = (E)BasicEList.this.data[cursor];
checkModCount();
lastCursor = cursor++;
return next;
}
catch (IndexOutOfBoundsException exception)
{
checkModCount();
throw new NoSuchElementException();
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/BasicEList.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/BasicEList.java
|
Method name: E doPrevious()
|
|
Method name: E doNext()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | try↵ | | 1 | try ↵
|
2 | {↵ | | 2 | {↵
|
3 | @SuppressWarnings("unchecked") E previous = (E)BasicEList.this.data[--cursor];↵ | | 3 | @SuppressWarnings("unchecked") E next = (E)BasicEList.this.data[cursor];↵
|
4 | checkModCount();↵ | | 4 | checkModCount();↵
|
5 | lastCursor = cursor;↵ | | 5 | lastCursor = cursor++;↵
|
6 | return previous;↵ | | 6 | return next;↵
|
7 | }↵ | | 7 | } ↵
|
8 | catch (IndexOutOfBoundsException exception)↵ | | 8 | catch (IndexOutOfBoundsException exception) ↵
|
9 | {↵ | | 9 | {↵
|
10 | checkModCount();↵ | | 10 | checkModCount();↵
|
11 | throw new NoSuchElementException();↵ | | 11 | throw new NoSuchElementException();↵
|
12 | } | | 12 | }
|
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 in the same java file |
Number of node comparisons | 25 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | try | | 1 | try |
2 | @SuppressWarnings("unchecked") E previous = (E)BasicEList.this.data[--cursor]; | | 2 | @SuppressWarnings("unchecked") E next = (E)BasicEList.this.data[cursor]; |
3 | | | 3 | |
| | | 4 | |
4 | | | | |
5 | | | 5 | |
Precondition Violations (0)
Row |
Violation |