for (int i = start; i < end; ++i, ++index)
{
@SuppressWarnings("unchecked") E object = (E)objects[i];
delegateAdd(validate(index, object));
didAdd(index, object);
didChange();
}
return true;
for (int i = start; i < end; ++i, ++index)
{
@SuppressWarnings("unchecked") E object = (E)objects[i];
delegateAdd(validate(index, object));
didAdd(index, object);
didChange();
}
return true;
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/DelegatingEList.java
|
Method name: boolean addAllUnique(Object[], int, int)
|
|
Method name: boolean addAllUnique(int, Object[], int, int)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | for (int i = start; i < end; ++i, ++index)↵ | | 1 | for (int i = start; i < end; ++i, ++index)↵
|
2 | {↵ | | 2 | {↵
|
3 | @SuppressWarnings("unchecked") E object = (E)objects[i];↵ | | 3 | @SuppressWarnings("unchecked") E object = (E)objects[i];↵
|
4 | delegateAdd(validate(index, object));↵ | | 4 | delegateAdd(validate(index, object));↵
|
5 | didAdd(index, object);↵ | | 5 | didAdd(index, object);↵
|
6 | didChange();↵ | | 6 | didChange();↵
|
7 | }↵ | | 7 | }↵
|
8 | ↵ | | 8 | ↵
|
9 | return true; | | 9 | return true;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 27 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 1.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
6 | for (int i = start; i < end; ++i, ++index) | | 5 | for (int i = start; i < end; ++i, ++index) |
7 | @SuppressWarnings("unchecked") E object = (E)objects[i]; | | 6 | @SuppressWarnings("unchecked") E object = (E)objects[i]; |
8 | delegateAdd(validate(index, object)); | | 7 | delegateAdd(validate(index, object)); |
9 | | | 8 | |
10 | | | 9 | |
11 | return true; | | 10 | return true; |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return true; |
2 | Conditional return true; |