File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java | |||
Method name: void setMinLengthFacet(EDataType, int)
|
Method name: void setTotalDigitsFacet(EDataType, int)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (length == -1)↵ | 1 | if (digits == -1)↵ | |
2 | {↵ | 2 | {↵ | |
3 | EAnnotation eAnnotation = getAnnotation(eDataType, false);↵ | 3 | EAnnotation eAnnotation = getAnnotation(eDataType, false);↵ | |
4 | if (eAnnotation != null)↵ | 4 | if (eAnnotation != null)↵ | |
5 | {↵ | 5 | {↵ | |
6 | eAnnotation.getDetails().remove("minLength");↵ | 6 | eAnnotation.getDetails().remove("totalDigits");↵ | |
7 | }↵ | 7 | }↵ | |
8 | }↵ | 8 | }↵ | |
9 | else↵ | 9 | else↵ | |
10 | {↵ | 10 | {↵ | |
11 | EAnnotation eAnnotation = getAnnotation(eDataType, true);↵ | 11 | EAnnotation eAnnotation = getAnnotation(eDataType, true);↵ | |
12 | eAnnotation.getDetails().put("minLength", Integer.toString(length));↵ | 12 | eAnnotation.getDetails().put("totalDigits", Integer.toString(digits));↵ | |
13 | } ↵ | 13 | } ↵ | |
14 | getExtendedMetaData(eDataType).setMinLengthFacet(length); | 14 | getExtendedMetaData(eDataType).setTotalDigitsFacet(digits); | |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 21 |
Number of mapped statements | 7 |
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) | 3.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (length == -1) |
| 1 | if (digits == -1) | |||||||||||||||
2 | EAnnotation eAnnotation = getAnnotation(eDataType, false); | 2 | EAnnotation eAnnotation = getAnnotation(eDataType, false); | ||||||||||||||||
3 | if (eAnnotation != null) | 3 | if (eAnnotation != null) | ||||||||||||||||
4 | eAnnotation.getDetails().remove("minLength"); |
| 4 | eAnnotation.getDetails().remove("totalDigits"); | |||||||||||||||
else | else | ||||||||||||||||||
5 | EAnnotation eAnnotation = getAnnotation(eDataType, true); | 5 | EAnnotation eAnnotation = getAnnotation(eDataType, true); | ||||||||||||||||
6 | eAnnotation.getDetails().put("minLength", Integer.toString(length)); |
| 6 | eAnnotation.getDetails().put("totalDigits", Integer.toString(digits)); | |||||||||||||||
7 | getExtendedMetaData(eDataType).setMinLengthFacet(length); |
| 7 | getExtendedMetaData(eDataType).setTotalDigitsFacet(digits); |
Row | Violation |
---|---|
1 | Expression getExtendedMetaData(eDataType).setMinLengthFacet(length) is a void method call, and thus it cannot be parameterized |
2 | Expression getExtendedMetaData(eDataType).setTotalDigitsFacet(digits) is a void method call, and thus it cannot be parameterized |