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: void add(int, Entry)
|
Method name: void add(EStructuralFeature, int, Object)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), entryFeature);↵ | 1 | FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature);↵ | |
2 | Entry [] entries = (Entry[])data;↵ | 2 | Entry [] entries = (Entry[])data;↵ | |
3 | for (int i = 0; i < size; ++i)↵ | 3 | for (int i = 0; i < size; ++i)↵ | |
4 | {↵ | 4 | {↵ | |
5 | Entry otherEntry = entries[i];↵ | 5 | Entry entry = entries[i];↵ | |
6 | if (validator.isValid(otherEntry.getEStructuralFeature()))↵ | 6 | if (validator.isValid(entry.getEStructuralFeature()))↵ | |
7 | {↵ | 7 | {↵ | |
8 | throw new IllegalArgumentException("The multiplicity constraint is violated");↵ | 8 | throw new IllegalArgumentException("The multiplicity constraint is violated");↵ | |
9 | }↵ | 9 | }↵ | |
10 | } | 10 |
| |
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 20 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), entryFeature); |
| 5 | FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); | ||||||||||
11 | Entry[] entries = (Entry[])data; | 6 | Entry[] entries = (Entry[])data; | |||||||||||
12 | for (int i = 0; i < size; ++i) | 7 | for (int i = 0; i < size; ++i) | |||||||||||
13 | Entry otherEntry = entries[i]; |
| 8 | Entry entry = entries[i]; | ||||||||||
14 | if (validator.isValid(otherEntry.getEStructuralFeature())) |
| 9 | if (validator.isValid(entry.getEStructuralFeature())) | ||||||||||
15 | throw new IllegalArgumentException("The multiplicity constraint is violated"); | 10 | throw new IllegalArgumentException("The multiplicity constraint is violated"); |
Row | Violation |
---|