if (oldObjects != null)
{
for (int i = 0; i < size; ++i)
{
@SuppressWarnings("unchecked") E object = (E)oldObjects[i];
didRemove(i, object);
}
}
if (oldObjects != null)
{
for (int i = 0; i < size; ++i)
{
@SuppressWarnings("unchecked") E object = (E)oldObjects[i];
didRemove(i, object);
}
}
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 didClear(int, Object[])
|
|
Method name: void didClear(int, Object[])
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (oldObjects != null)↵ | | 1 | if (oldObjects != null)↵
|
2 | {↵ | | 2 | {↵
|
3 | for (int i = 0; i < size; ++i)↵ | | 3 | for (int i = 0; i < size; ++i)↵
|
4 | {↵ | | 4 | {↵
|
5 | @SuppressWarnings("unchecked") E object = (E)oldObjects[i];↵ | | 5 | @SuppressWarnings("unchecked") E object = (E)oldObjects[i];↵
|
6 | didRemove(i, object);↵ | | 6 | didRemove(i, object);↵
|
7 | }↵ | | 7 | }↵
|
8 | } | | 8 | }
|
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 having the same super class |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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.5 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (oldObjects != null) | | 1 | if (oldObjects != null) |
2 | for (int i = 0; i < size; ++i) | | 2 | for (int i = 0; i < size; ++i) |
3 | @SuppressWarnings("unchecked") E object = (E)oldObjects[i]; | | 3 | @SuppressWarnings("unchecked") E object = (E)oldObjects[i]; |
4 | | | 4 | |
Precondition Violations (0)
Row |
Violation |