File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java | |||
Method name: EStructuralFeature getAffiliation(EClass, EStructuralFeature)
|
Method name: EStructuralFeature getAttributeWildcardAffiliation(EClass, String, String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 6 | |||
1 | List<EStructuralFeature> allElements = getAllElements(eClass);↵ | 1 | List<EStructuralFeature> allAttributes = getAllAttributes(eClass);↵ | |
2 | for (int i = 0, size = allElements.size(); i < size; ++i)↵ | 2 | for (int i = 0, size = allAttributes.size(); i < size; ++i)↵ | |
3 | {↵ | 3 | ↵ | |
4 | ↵ | 4 | {↵ | |
5 | EStructuralFeature result = allElements.get(i);↵ | 5 | EStructuralFeature result = allAttributes.get(i);↵ | |
6 | if (matches(getWildcards(result), namespace))↵ | 6 | if (matches(getWildcards(result), namespace))↵ | |
7 | {↵ | 7 | {↵ | |
8 | return result;↵ | 8 | return result;↵ | |
9 | }↵ | 9 | }↵ | |
10 | ↵ | 10 | }↵ | |
11 | } | 11 | return null; | |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 15.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26 | List<EStructuralFeature> allElements = getAllElements(eClass); |
| 1 | List<EStructuralFeature> allAttributes = getAllAttributes(eClass); | |||||||||||||
27 | for (int i = 0, size = allElements.size(); i < size; ++i) |
| 2 | for (int i = 0, size = allAttributes.size(); i < size; ++i) | |||||||||||||
28 | EStructuralFeature result = allElements.get(i); |
| 3 | EStructuralFeature result = allAttributes.get(i); | |||||||||||||
29 | if (matches(getWildcards(result), namespace)) | 4 | if (matches(getWildcards(result), namespace)) | ||||||||||||||
30 | return result; | 5 | return result; | ||||||||||||||
|
| 6 | return null; |
Row | Violation |
---|---|
1 | Unmatched return null; |