File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EObjectValidator.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EObjectValidator.java | |||
Method name: boolean validate(EDataType, Object, DiagnosticChain, Map
|
Method name: boolean validate(EDataType, Object, DiagnosticChain, Map
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | @SuppressWarnings("unchecked") Comparable<Object> comparableObject = (Comparable<Object>)effectiveMin;↵ | 1 | @SuppressWarnings("unchecked") Comparable<Object> comparableObject = (Comparable<Object>)effectiveMax;↵ | |
2 | if (effectiveMinIsInclusive ?↵ | 2 | if (effectiveMaxIsInclusive ?↵ | |
3 | comparableObject.compareTo(value) > 0:↵ | 3 | comparableObject.compareTo(value) < 0:↵ | |
4 | comparableObject.compareTo(value) >= 0)↵ | 4 | comparableObject.compareTo(value) <= 0)↵ | |
5 | {↵ | 5 | {↵ | |
6 | if (diagnostics != null)↵ | 6 | if (diagnostics != null)↵ | |
7 | {↵ | 7 | {↵ | |
8 | if (effectiveTotalDigitsMin != -1)↵ | 8 | if (effectiveTotalDigitsMax != -1)↵ | |
9 | {↵ | 9 | {↵ | |
10 | reportTotalDigitsViolation(eDataType, value, effectiveTotalDigitsMin, diagnostics, context);↵ | 10 | reportTotalDigitsViolation(eDataType, value, effectiveTotalDigitsMax, diagnostics, context);↵ | |
11 | }↵ | 11 | }↵ | |
12 | else↵ | 12 | else↵ | |
13 | {↵ | 13 | {↵ | |
14 | reportMinViolation(eDataType, value, effectiveMin, effectiveMinIsInclusive, diagnostics, context);↵ | 14 | reportMaxViolation(eDataType, value, effectiveMax, effectiveMaxIsInclusive, diagnostics, context);↵ | |
15 | }↵ | 15 | }↵ | |
16 | }↵ | 16 | }↵ | |
17 | result = false;↵ | 17 | result = false;↵ | |
18 | } | 18 |
| |
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.5 |
Clones location | Clones are in the same method |
Number of node comparisons | 11 |
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) | 325.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | if (diagnostics != null) | 20 | if (diagnostics != null) | |||||||||||||||||||||
13 | if (effectiveTotalDigitsMin != -1) |
| 21 | if (effectiveTotalDigitsMax != -1) | ||||||||||||||||||||
14 | reportTotalDigitsViolation(eDataType, value, effectiveTotalDigitsMin, diagnostics, context); |
| 22 | reportTotalDigitsViolation(eDataType, value, effectiveTotalDigitsMax, diagnostics, context); | ||||||||||||||||||||
else | else | |||||||||||||||||||||||
15 | reportMinViolation(eDataType, value, effectiveMin, effectiveMinIsInclusive, diagnostics, context); |
| 23 | reportMaxViolation(eDataType, value, effectiveMax, effectiveMaxIsInclusive, diagnostics, context); |
Row | Violation |
---|---|
1 | Expression reportMinViolation(eDataType,value,effectiveMin,effectiveMinIsInclusive,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression reportMaxViolation(eDataType,value,effectiveMax,effectiveMaxIsInclusive,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression reportMinViolation(eDataType,value,effectiveMin,effectiveMinIsInclusive,diagnostics,context) is a void method call, and thus it cannot be parameterized |
4 | Expression reportMaxViolation(eDataType,value,effectiveMax,effectiveMaxIsInclusive,diagnostics,context) is a void method call, and thus it cannot be parameterized |