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 save(Writer, Map,?>)
|
Method name: void load(Node, Map,?>)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 7 | |||
1 | if (defaultSaveOptions == null || defaultSaveOptions.isEmpty())↵ | 1 | if (defaultLoadOptions == null || defaultLoadOptions.isEmpty())↵ | |
2 | {↵ | 2 | ↵ | |
3 | doSave(writer↵ | 3 | {↵ | |
4 | , options);↵ | 4 | doLoad(node, options);↵ | |
5 | }↵ | 5 | ↵ | |
6 | }↵ | |||
6 | else if (options == null)↵ | 7 | else if (options == null)↵ | |
7 | {↵ | 8 | ↵ | |
8 | doSave(writer↵ | 9 | {↵ | |
9 | , defaultSaveOptions);↵ | 10 | doLoad(node, defaultLoadOptions);↵ | |
10 | }↵ | 11 | ↵ | |
12 | }↵ | |||
11 | else↵ | 13 | else↵ | |
12 | {↵ | 14 | ↵ | |
15 | {↵ | |||
13 | Map<Object, Object> mergedOptions = new HashMap<Object, Object>(defaultSaveOptions);↵ | 16 | Map<Object, Object> mergedOptions = new HashMap<Object, Object>(defaultLoadOptions);↵ | |
14 | mergedOptions.putAll(options);↵ | 17 | mergedOptions.putAll(options);↵ | |
15 | doSave(writer↵ | 18 | ↵ | |
16 | , mergedOptions);↵ | 19 | doLoad(node, mergedOptions);↵ | |
17 | }↵ | 20 | ↵ | |
18 | setModified(false); | 21 | } | |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 40 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 1.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (defaultSaveOptions == null || defaultSaveOptions.isEmpty()) |
| 9 | if (defaultLoadOptions == null || defaultLoadOptions.isEmpty()) | |||||||||||||
2 | doSave(writer, options); | | |||||||||||||||
| 10 | doLoad(node, options); | |||||||||||||||
3 | else if (options == null) |
| 11 | else if (options == null) | |||||||||||||
4 | doSave(writer, defaultSaveOptions); | | |||||||||||||||
| 12 | doLoad(node, defaultLoadOptions); | |||||||||||||||
else | else | ||||||||||||||||
5 | Map<Object, Object> mergedOptions = new HashMap<Object, Object>(defaultSaveOptions); |
| 13 | Map<Object, Object> mergedOptions = new HashMap<Object, Object>(defaultLoadOptions); | |||||||||||||
6 | mergedOptions.putAll(options); |
| 14 | mergedOptions.putAll(options); | |||||||||||||
7 | doSave(writer, mergedOptions); | | |||||||||||||||
| 15 | doLoad(node, mergedOptions); | |||||||||||||||
8 | setModified(false); | |
Row | Violation |
---|---|
1 | Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options |
2 | Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options |