File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java | |||
Method name: boolean validateEGenericType_ConsistentType(EGenericType, DiagnosticChain, Map
|
Method name: boolean validateEGenericType_ConsistentType(EGenericType, DiagnosticChain, Map
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (eContainer instanceof EAttribute)↵ | 1 | if (eC↵ | |
2 | {↵ | |||
3 | // The classifier of an attribute's generic type must be a data type.↵ | |||
4 | ↵ | 2 | lassifier == null && eTypeParameter == null)↵ | |
5 | //↵ | 3 | ↵ | |
6 | ↵ | 4 | {↵ | |
7 | if (diagnostics == null)↵ | 5 | if (diagnostics == null)↵ | |
8 | {↵ | 6 | {↵ | |
9 | return false;↵ | 7 | return false;↵ | |
10 | }↵ | 8 | }↵ | |
11 | else↵ | 9 | else↵ | |
12 | {↵ | 10 | {↵ | |
13 | result = false;↵ | 11 | result = false;↵ | |
14 | diagnostics.add↵ | 12 | diagnostics.add↵ | |
15 | (createDiagnostic↵ | 13 | (createDiagnostic↵ | |
16 | (Diagnostic.ERROR,↵ | 14 | (Diagnostic.ERROR,↵ | |
17 | DIAGNOSTIC_SOURCE,↵ | 15 | DIAGNOSTIC_SOURCE,↵ | |
18 | CONSISTENT_TYPE_CLASS_NOT_PERMITTED,↵ | 16 | CONSISTENT_TYPE_WILDCARD_NOT_PERMITTED,↵ | |
19 | "_UI_EAttributeNoDataType_diagnostic",↵ | 17 | "_UI_EGenericTypeNoTypeParameterOrClassifier_diagnostic",↵ | |
20 | null,↵ | 18 | null,↵ | |
21 | new Object[] { eGenericType },↵ | 19 | new Object[] { eGenericType },↵ | |
22 | context));↵ | 20 | context));↵ | |
23 | }↵ | 21 | ↵ | |
24 | ↵ | 22 | }↵ | |
25 | } | 23 |
| |
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.1 |
Clones location | Clones are in the same method |
Number of node comparisons | 17 |
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) | 10.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
50 | if (diagnostics == null) | 35 | if (diagnostics == null) | ||||||||||||||
51 | return false; |
| 36 | return false; | |||||||||||||
else | else | ||||||||||||||||
52 | result = false; | 37 | result = false; | ||||||||||||||
53 | diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, CONSISTENT_TYPE_CLASS_NOT_PERMITTED, "_UI_EAttributeNoDataType_diagnostic", null, new Object[] {eGenericType}, context)); |
| 38 | diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, CONSISTENT_TYPE_WILDCARD_NOT_PERMITTED, "_UI_EGenericTypeNoTypeParameterOrClassifier_diagnostic", null, new Object[] {eGenericType}, context)); |
Row | Violation |
---|---|
1 | Conditional return false; |
2 | Conditional return false; |