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_ConsistentBounds(EGenericType, DiagnosticChain, Map
|
Method name: boolean validateEOperation_UniqueParameterNames(EOperation, DiagnosticChain, Map
|
|||
Number of AST nodes: 4 | Number of AST nodes: 5 | |||
1 | if (diagnostics == null)↵ | 1 | if (diagnostics == null)↵ | |
2 | {↵ | 2 | ↵ | |
3 | {↵ | |||
3 | return false;↵ | 4 | return false;↵ | |
4 | }↵ | 5 | ↵ | |
6 | }↵ | |||
5 | else↵ | 7 | else↵ | |
6 | {↵ | 8 | ↵ | |
9 | {↵ | |||
7 | result = false;↵ | 10 | result = false;↵ | |
11 | EParameter otherEParameter = eParameters.get(index);↵ | |||
8 | diagnostics.add↵ | 12 | diagnostics.add↵ | |
9 | (createDiagnostic↵ | 13 | (createDiagnostic↵ | |
10 | (Diagnostic.ERROR,↵ | 14 | (Diagnostic.ERROR,↵ | |
11 | DIAGNOSTIC_SOURCE,↵ | 15 | DIAGNOSTIC_SOURCE,↵ | |
12 | CONSISTENT_BOUNDS_NOT_ALLOWED,↵ | 16 | ↵ | |
13 | "_UI_EGenericTypeBoundsOnlyForTypeArgument↵ | 17 | UNIQUE_PARAMETER_NAMES,↵ | |
14 | _diagnostic",↵ | 18 | "_UI_EOperationUniqueParameterNames_diagnostic", ↵ | |
15 | null,↵ | 19 | new Object[] { name },↵ | |
16 | new Object[] { eGenericType },↵ | 20 | new Object[] { eOperation, eParameter, otherEParameter },↵ | |
17 | context));↵ | 21 | context));↵ | |
18 | } | 22 | } | |
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 declared in the same class |
Number of node comparisons | 20 |
Number of mapped statements | 4 |
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) | 1.6 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17 | if (diagnostics == null) | 9 | if (diagnostics == null) | ||||||||||||||||||||
18 | return false; | 10 | return false; | ||||||||||||||||||||
else | else | ||||||||||||||||||||||
19 | result = false; | 11 | result = false; | ||||||||||||||||||||
|
| 12 | EParameter otherEParameter = eParameters.get(index); | ||||||||||||||||||||
20 | diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, CONSISTENT_BOUNDS_NOT_ALLOWED, "_UI_EGenericTypeBoundsOnlyForTypeArgument_diagnostic", null, new Object[] {eGenericType}, context)); |
| 13 | diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, UNIQUE_PARAMETER_NAMES, "_UI_EOperationUniqueParameterNames_diagnostic", new Object[] {name}, new Object[] {eOperation, eParameter, otherEParameter}, context)); |
Row | Violation |
---|---|
1 | Unmatched statement EParameter otherEParameter=eParameters.get(index); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |