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: void DynamicEDataTypeValidator(EDataType)
|
Method name: void DynamicEDataTypeValidator(EDataType)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | Object lowerBound = EcoreUtil.createFromString(eDataType, "-" + digits.toString());↵ | 1 | Object upperBound = EcoreUtil.createFromString(eDataType, digits.toString());↵ | |
2 | @SuppressWarnings("unchecked") boolean lowerBounded = effectiveMin == null ||↵ | 2 | @SuppressWarnings("unchecked") boolean upperBounded = effectiveMax == null ||↵ | |
3 | (effectiveMinIsInclusive ?↵ | 3 | (effectiveMaxIsInclusive ?↵ | |
4 | ((Comparable<Object>)effectiveMin).compareTo(lowerBound) <= 0:↵ | 4 | ((Comparable<Object>)effectiveMax).compareTo(upperBound) >= 0:↵ | |
5 | ((Comparable<Object>)effectiveMin).compareTo(lowerBound) < 0);↵ | 5 | ((Comparable<Object>)effectiveMax).compareTo(upperBound) > 0);↵ | |
6 | if (lowerBounded)↵ | 6 | if (upperBounded)↵ | |
7 | {↵ | 7 | {↵ | |
8 | effectiveMinIsInclusive = false;↵ | 8 | effectiveMaxIsInclusive = false;↵ | |
9 | effectiveMin = lowerBound;↵ | 9 | effectiveMax = upperBound;↵ | |
10 | effectiveTotalDigitsMin = effectiveTotalDigits;↵ | 10 | effectiveTotalDigitsMax = effectiveTotalDigits;↵ | |
11 | } | 11 |
| |
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 | 23 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 2.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
69 | Object lowerBound = EcoreUtil.createFromString(eDataType, "-" + digits.toString()); |
| 76 | Object upperBound = EcoreUtil.createFromString(eDataType, digits.toString()); | |||||||||||||||
71 | if (lowerBounded) |
| 78 | if (upperBounded) | |||||||||||||||
72 | effectiveMinIsInclusive = false; |
| 79 | effectiveMaxIsInclusive = false; | |||||||||||||||
73 | effectiveMin = lowerBound; |
| 80 | effectiveMax = upperBound; | |||||||||||||||
74 | effectiveTotalDigitsMin = effectiveTotalDigits; |
| 81 | effectiveTotalDigitsMax = effectiveTotalDigits; |
Row | Violation |
---|---|
1 | Expression effectiveMinIsInclusive is a field being modified, and thus it cannot be parameterized |
2 | Expression effectiveMaxIsInclusive is a field being modified, and thus it cannot be parameterized |
3 | Expression effectiveMin is a field being modified, and thus it cannot be parameterized |
4 | Expression effectiveMax is a field being modified, and thus it cannot be parameterized |
5 | Expression effectiveTotalDigitsMin is a field being modified, and thus it cannot be parameterized |
6 | Expression effectiveTotalDigitsMax is a field being modified, and thus it cannot be parameterized |