File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java | |||
Method name: Entry set(int, Entry)
|
Method name: void add(int, Entry)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (entryFeature.isUnique())↵ | 1 | if (entryFeature.isUnique())↵ | |
2 | {↵ | 2 | {↵ | |
3 | Entry [] entries = (Entry[])data;↵ | 3 | Entry [] entries = (Entry[])data;↵ | |
4 | for (int i = 0; i < size; ++i)↵ | 4 | for (int i = 0; i < size; ++i)↵ | |
5 | {↵ | 5 | {↵ | |
6 | Entry otherEntry = entries[i];↵ | 6 | Entry otherEntry = entries[i];↵ | |
7 | if (otherEntry.equals(entry) && i != index)↵ | 7 | if (otherEntry.equals(entry) && i != index)↵ | |
8 | {↵ | 8 | {↵ | |
9 | throw new IllegalArgumentException("The 'no duplicates' constraint is violated");↵ | 9 | throw new IllegalArgumentException("The 'no duplicates' constraint is violated");↵ | |
10 | }↵ | 10 | }↵ | |
11 | }↵ | 11 | }↵ | |
12 | } | 12 |
| |
See real code fragment | See real code fragment |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
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) | 0.7 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
4 | if (entryFeature.isUnique()) | 4 | if (entryFeature.isUnique()) | |
5 | Entry[] entries = (Entry[])data; | 5 | Entry[] entries = (Entry[])data; | |
6 | for (int i = 0; i < size; ++i) | 6 | for (int i = 0; i < size; ++i) | |
7 | Entry otherEntry = entries[i]; | 7 | Entry otherEntry = entries[i]; | |
8 | if (otherEntry.equals(entry) && i != index) | 8 | if (otherEntry.equals(entry) && i != index) | |
9 | throw new IllegalArgumentException("The 'no duplicates' constraint is violated"); | 9 | throw new IllegalArgumentException("The 'no duplicates' constraint is violated"); |
Row | Violation |
---|