XMLLoad xmlLoad = createXMLLoad();
if (options == null)
{
options = Collections.EMPTY_MAP;
}
xmlLoad.load(this, node, options);
XMLSave xmlSave = createXMLSave();
if (options == null)
{
options = Collections.EMPTY_MAP;
}
xmlSave.save(this, writer, options);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLResourceImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLResourceImpl.java
|
Method name: void doLoad(Node, Map,?>)
|
|
Method name: void doSave(Writer, Map,?>)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | XMLLoad xmlLoad = createXMLLoad();↵ | | 1 | XMLSave xmlSave = createXMLSave();↵
|
|
2 | if (options == null)↵ | | 2 | if (options == null)↵
|
3 | {↵ | | 3 | {↵
|
4 | options = Collections.EMPTY_MAP;↵ | | 4 | options = Collections.EMPTY_MAP;↵
|
5 | }↵ | | 5 | }↵
|
6 | ↵ | | |
|
7 | xmlLoad.load(this, node, options); | | 6 | xmlSave.save(this, writer, options);
|
See real code fragment |
|
See real code fragment |
Summary
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 declared in the same class |
Number of node comparisons | 8 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 1 | XMLSave xmlSave = createXMLSave(); |
1 | XMLLoad xmlLoad = createXMLLoad(); | | | |
2 | if (options == null) | | 2 | if (options == null) |
3 | options = Collections.EMPTY_MAP; | | 3 | options = Collections.EMPTY_MAP; |
| | | 4 | xmlSave.save(this, writer, options); |
4 | xmlLoad.load(this, node, options); | | | |
Precondition Violations (1)
Row |
Violation |
1 | Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options |