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 validateEClass_WellFormedMapEntryClass(EClass, DiagnosticChain, Map
|
Method name: boolean validateEClass_WellFormedMapEntryClass(EClass, DiagnosticChain, Map
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (keyFeature == null)↵ | 1 | if (valueFeature == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | if (diagnostics == null)↵ | 3 | if (diagnostics == null)↵ | |
4 | {↵ | 4 | {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | else↵ | 7 | else↵ | |
8 | {↵ | 8 | {↵ | |
9 | result = false;↵ | 9 | result = false;↵ | |
10 | diagnostics.add↵ | 10 | diagnostics.add↵ | |
11 | (createDiagnostic↵ | 11 | (createDiagnostic↵ | |
12 | (Diagnostic.ERROR,↵ | 12 | (Diagnostic.ERROR,↵ | |
13 | DIAGNOSTIC_SOURCE,↵ | 13 | DIAGNOSTIC_SOURCE,↵ | |
14 | WELL_FORMED_MAP_ENTRY_CLASS,↵ | 14 | WELL_FORMED_MAP_ENTRY_CLASS,↵ | |
15 | "_UI_EClassNotWellFormedMapEntry_diagnostic",↵ | 15 | "_UI_EClassNotWellFormedMapEntry_diagnostic", ↵ | |
16 | new Object[] { "key" },↵ | 16 | new Object[] { "value" },↵ | |
17 | new Object[] { eClass },↵ | 17 | new Object[] { eClass },↵ | |
18 | context));↵ | 18 | context));↵ | |
19 | }↵ | 19 | }↵ | |
20 | } | 20 |
| |
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 in the same method |
Number of node comparisons | 18 |
Number of mapped statements | 5 |
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) | 2.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (keyFeature == null) |
| 10 | if (valueFeature == null) | ||||||||||
5 | if (diagnostics == null) | 11 | if (diagnostics == null) | |||||||||||
6 | return false; |
| 12 | return false; | ||||||||||
else | else | |||||||||||||
7 | result = false; | 13 | result = false; | |||||||||||
8 | diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, WELL_FORMED_MAP_ENTRY_CLASS, "_UI_EClassNotWellFormedMapEntry_diagnostic", new Object[] {"key"}, new Object[] {eClass}, context)); |
| 14 | diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, WELL_FORMED_MAP_ENTRY_CLASS, "_UI_EClassNotWellFormedMapEntry_diagnostic", new Object[] {"value"}, new Object[] {eClass}, context)); |
Row | Violation |
---|---|
1 | Conditional return false; |
2 | Conditional return false; |