File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/XMLCalendar.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/XMLDuration.java | |||
Method name: int compare(XMLCalendar, XMLCalendar)
|
Method name: int compare(XMLDuration, XMLDuration)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | switch (value1.xmlGregorianCalendar.compare(value2.xmlGregorianCalendar))↵ | 1 | switch (value1.duration.compare(value2.duration))↵ | |
2 | {↵ | 2 | {↵ | |
3 | case DatatypeConstants.EQUAL:↵ | 3 | case DatatypeConstants.EQUAL:↵ | |
4 | {↵ | 4 | {↵ | |
5 | return XMLCalendar.EQUALS;↵ | 5 | return XMLCalendar.EQUALS;↵ | |
6 | }↵ | 6 | }↵ | |
7 | case DatatypeConstants.LESSER:↵ | 7 | case DatatypeConstants.LESSER:↵ | |
8 | {↵ | 8 | {↵ | |
9 | return XMLCalendar.LESS_THAN;↵ | 9 | return XMLCalendar.LESS_THAN;↵ | |
10 | }↵ | 10 | }↵ | |
11 | case DatatypeConstants.GREATER:↵ | 11 | case DatatypeConstants.GREATER:↵ | |
12 | {↵ | 12 | {↵ | |
13 | return XMLCalendar.GREATER_THAN;↵ | 13 | return XMLCalendar.GREATER_THAN;↵ | |
14 | }↵ | 14 | }↵ | |
15 | default:↵ | 15 | default:↵ | |
16 | {↵ | 16 | {↵ | |
17 | return XMLCalendar.INDETERMINATE;↵ | 17 | return XMLCalendar.INDETERMINATE;↵ | |
18 | }↵ | 18 | }↵ | |
19 | } | 19 |
| |
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 in different classes |
Number of node comparisons | 41 |
Number of mapped statements | 9 |
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) | 1.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | switch (value1.xmlGregorianCalendar.compare(value2.xmlGregorianCalendar)) |
| 1 | switch (value1.duration.compare(value2.duration)) | |||||||||||||||||||||||||||||
2 | case DatatypeConstants.EQUAL: | 2 | case DatatypeConstants.EQUAL: | ||||||||||||||||||||||||||||||
3 | return XMLCalendar.EQUALS; | 3 | return XMLCalendar.EQUALS; | ||||||||||||||||||||||||||||||
4 | case DatatypeConstants.LESSER: | 4 | case DatatypeConstants.LESSER: | ||||||||||||||||||||||||||||||
5 | return XMLCalendar.LESS_THAN; | 5 | return XMLCalendar.LESS_THAN; | ||||||||||||||||||||||||||||||
6 | case DatatypeConstants.GREATER: | 6 | case DatatypeConstants.GREATER: | ||||||||||||||||||||||||||||||
7 | return XMLCalendar.GREATER_THAN; | 7 | return XMLCalendar.GREATER_THAN; | ||||||||||||||||||||||||||||||
8 | default: | 8 | default: | ||||||||||||||||||||||||||||||
9 | return XMLCalendar.INDETERMINATE; | 9 | return XMLCalendar.INDETERMINATE; |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.xml.type.internal.XMLCalendar of variable value2 does not match with type org.eclipse.emf.ecore.xml.type.internal.XMLDuration of variable value2 |
2 | Type javax.xml.datatype.XMLGregorianCalendar of variable value2.xmlGregorianCalendar does not match with type javax.xml.datatype.Duration of variable value2.duration |
3 | Type org.eclipse.emf.ecore.xml.type.internal.XMLCalendar of variable value1 does not match with type org.eclipse.emf.ecore.xml.type.internal.XMLDuration of variable value1 |
4 | Type javax.xml.datatype.XMLGregorianCalendar of variable value1.xmlGregorianCalendar does not match with type javax.xml.datatype.Duration of variable value1.duration |