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 setMaxExclusiveFacet(EDataType, String)
|
Method name: void setMaxInclusiveFacet(EDataType, String)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (literal == null)↵ | 1 | if (literal == null)↵ | |
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("maxExclusive");↵ | 6 | eAnnotation.getDetails().remove("maxInclusive");↵ | |
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("maxExclusive", literal);↵ | 12 | eAnnotation.getDetails().put("maxInclusive", literal);↵ | |
13 | } ↵ | 13 | } ↵ | |
14 | getExtendedMetaData(eDataType).setMaxExclusiveFacet(literal); | 14 | getExtendedMetaData(eDataType).setMaxInclusiveFacet(literal); | |
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) | 4.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (literal == null) | 1 | if (literal == null) | |||||||||||||
2 | EAnnotation eAnnotation = getAnnotation(eDataType, false); | 2 | EAnnotation eAnnotation = getAnnotation(eDataType, false); | |||||||||||||
3 | if (eAnnotation != null) | 3 | if (eAnnotation != null) | |||||||||||||
4 | eAnnotation.getDetails().remove("maxExclusive"); |
| 4 | eAnnotation.getDetails().remove("maxInclusive"); | ||||||||||||
else | else | |||||||||||||||
5 | EAnnotation eAnnotation = getAnnotation(eDataType, true); | 5 | EAnnotation eAnnotation = getAnnotation(eDataType, true); | |||||||||||||
6 | eAnnotation.getDetails().put("maxExclusive", literal); |
| 6 | eAnnotation.getDetails().put("maxInclusive", literal); | ||||||||||||
7 | getExtendedMetaData(eDataType).setMaxExclusiveFacet(literal); |
| 7 | getExtendedMetaData(eDataType).setMaxInclusiveFacet(literal); |
Row | Violation |
---|---|
1 | Expression getExtendedMetaData(eDataType).setMaxExclusiveFacet(literal) is a void method call, and thus it cannot be parameterized |
2 | Expression getExtendedMetaData(eDataType).setMaxInclusiveFacet(literal) is a void method call, and thus it cannot be parameterized |