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: Object set(EStructuralFeature, int, Object)
|
Method name: Object[] toArray(EStructuralFeature, boolean)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | for (int i = 0; i < size; ++i)↵ | 1 | for (int i = 0; i < size; ++i)↵ | |
2 | {↵ | 2 | {↵ | |
3 | Entry entry = entries[i];↵ | 3 | Entry entry = entries[i];↵ | |
4 | if (validator.isValid(entry.getEStructuralFeature()))↵ | 4 | if (validator.isValid(entry.getEStructuralFeature()))↵ | |
5 | {↵ | 5 | {↵ | |
6 | return FeatureMapUtil.isFeatureMap(feature) ? entry : entry.getValue();↵ | 6 | re↵ | |
7 | }↵ | |||
8 | }↵ | |||
9 | return null; | 7 | sult.add(entry);↵ | |
8 | }↵ | |||
9 |
| |||
See real code fragment | See real code fragment |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 8 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
16 | for (int i = 0; i < size; ++i) | 5 | for (int i = 0; i < size; ++i) | |||||
17 | Entry entry = entries[i]; | 6 | Entry entry = entries[i]; | |||||
18 | if (validator.isValid(entry.getEStructuralFeature())) | 7 | if (validator.isValid(entry.getEStructuralFeature())) | |||||
|
| 8 | result.add(entry); | |||||
19 | return FeatureMapUtil.isFeatureMap(feature) ? entry : entry.getValue(); |
| | |||||
20 | return null; |
| |
Row | Violation |
---|---|
1 | Unmatched statement result.add(entry); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement return FeatureMapUtil.isFeatureMap(feature) ? entry : entry.getValue(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched return FeatureMapUtil.isFeatureMap(feature) ? entry : entry.getValue(); |
4 | Unmatched return null; |