if (lastCursor == -1)
{
throw new IllegalStateException();
}
checkModCount();
try
{
DelegatingEList.this.set(lastCursor, object);
}
catch (IndexOutOfBoundsException exception)
{
throw new ConcurrentModificationException();
}
if (lastCursor == -1)
{
throw new IllegalStateException();
}
checkModCount();
try
{
BasicEList.this.set(lastCursor, object);
}
catch (IndexOutOfBoundsException exception)
{
throw new ConcurrentModificationException();
}
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/BasicEList.java
|
Method name: void doSet(E)
|
|
Method name: void doSet(E)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (lastCursor == -1)↵ | | 1 | if (lastCursor == -1)↵
|
2 | {↵ | | 2 | {↵
|
3 | throw new IllegalStateException();↵ | | 3 | throw new IllegalStateException();↵
|
4 | }↵ | | 4 | }↵
|
5 | checkModCount();↵ | | 5 | checkModCount();↵
|
|
6 | try ↵ | | 6 | try ↵
|
7 | {↵ | | 7 | {↵
|
8 | DelegatingEList.this.set(lastCursor, object);↵ | | 8 | BasicEList.this.set(lastCursor, object);↵
|
9 | } ↵ | | 9 | } ↵
|
10 | catch (IndexOutOfBoundsException exception) ↵ | | 10 | catch (IndexOutOfBoundsException exception) ↵
|
11 | {↵ | | 11 | {↵
|
12 | throw new ConcurrentModificationException();↵ | | 12 | throw new ConcurrentModificationException();↵
|
13 | } | | 13 | }
|
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 in different classes |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (lastCursor == -1) | | 1 | if (lastCursor == -1) |
2 | throw new IllegalStateException(); | | 2 | throw new IllegalStateException(); |
3 | checkModCount(); | | 3 | checkModCount(); |
4 | try | | 4 | try |
5 | DelegatingEList.this.set(lastCursor, object); | | 5 | BasicEList.this.set(lastCursor, object); |
Precondition Violations (0)
Row |
Violation |