checkModCount();
try
{
BasicEList.this.add(cursor++, object);
expectedModCount = modCount;
lastCursor = -1;
}
catch (IndexOutOfBoundsException exception)
{
throw new ConcurrentModificationException();
}
checkModCount();
try
{
DelegatingEList.this.add(cursor++, object);
expectedModCount = modCount;
lastCursor = -1;
}
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/BasicEList.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/DelegatingEList.java
|
Method name: void doAdd(E)
|
|
Method name: void doAdd(E)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | checkModCount();↵ | | 1 | checkModCount();↵
|
|
2 | try ↵ | | 2 | try ↵
|
3 | {↵ | | 3 | {↵
|
4 | BasicEList.this.add(cursor++, object);↵ | | 4 | DelegatingEList.this.add(cursor++, object);↵
|
5 | expectedModCount = modCount;↵ | | 5 | expectedModCount = modCount;↵
|
6 | lastCursor = -1;↵ | | 6 | lastCursor = -1;↵
|
7 | }↵ | | 7 | }↵
|
8 | catch (IndexOutOfBoundsException exception) ↵ | | 8 | catch (IndexOutOfBoundsException exception) ↵
|
9 | {↵ | | 9 | {↵
|
10 | throw new ConcurrentModificationException();↵ | | 10 | throw new ConcurrentModificationException();↵
|
11 | } | | 11 | }
|
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 different classes |
Number of node comparisons | 17 |
-
{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.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | checkModCount(); | | 1 | checkModCount(); |
2 | try | | 2 | try |
3 | BasicEList.this.add(cursor++, object); | | 3 | DelegatingEList.this.add(cursor++, object); |
4 | expectedModCount = modCount; | | 4 | expectedModCount = modCount; |
5 | | | 5 | |
Precondition Violations (0)
Row |
Violation |