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: boolean contains(EStructuralFeature, Object, boolean)
|
Method name: boolean contains(EStructuralFeature, Object, boolean)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for (int i = 0; i < size; ++i)↵ | 1 | for (int i = 0; i < size; ++i)↵ | |
2 | {↵ | 2 | ↵ | |
3 | ↵ | 3 | {↵ | |
4 | Entry entry = entries[i];↵ | 4 | Entry entry = entries[i];↵ | |
5 | if (validator.isValid(entry.getEStructuralFeature()) && object == resolveProxy((EObject)entry.getValue()))↵ | 5 | if (validator.isValid(entry.getEStructuralFeature()) && ↵ | |
6 | ↵ | 6 | entry.equals(object))↵ | |
7 | {↵ | 7 | {↵ | |
8 | return true;↵ | 8 | return true;↵ | |
9 | }↵ | 9 | ↵ | |
10 | ↵ | 10 | }↵ | |
11 | } | 11 |
| |
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 9 |
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) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14 | for (int i = 0; i < size; ++i) | 4 | for (int i = 0; i < size; ++i) | |||||||||||||
15 | Entry entry = entries[i]; | 5 | Entry entry = entries[i]; | |||||||||||||
16 | if (validator.isValid(entry.getEStructuralFeature()) && object == resolveProxy((EObject)entry.getValue())) |
| 6 | if (validator.isValid(entry.getEStructuralFeature()) && entry.equals(object)) | ||||||||||||
17 | return true; |
| 7 | return true; |
Row | Violation |
---|---|
1 | Expression object == resolveProxy((EObject)entry.getValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression entry.equals(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Conditional return true; |
4 | Conditional return true; |