File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java | |||
Method name: Document save(XMLResource, Document, Map,?>, DOMHandler)
|
Method name: void save(XMLResource, Writer, Map,?>)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | this.xmlResource = resource;↵ | 1 | this.xmlResource = resource;↵ | |
2 | ↵ | |||
3 | init(resource, options);↵ | 2 | init(resource, options);↵ | |
4 | @SuppressWarnings("unchecked")↵ | 3 | @SuppressWarnings("unchecked")↵ | |
5 | List<? extends EObject> contents = roots = (List<? extends EObject>)options.get(XMLResource.OPTION_ROOT_OBJECTS);↵ | 4 | List<? extends EObject> contents = roots = (List<? extends EObject>)options.get(XMLResource.OPTION_ROOT_OBJECTS);↵ | |
6 | if (contents == null)↵ | 5 | if (contents == null)↵ | |
7 | {↵ | 6 | {↵ | |
8 | contents = resource.getContents();↵ | 7 | contents = resource.getContents();↵ | |
9 | }↵ | 8 | }↵ | |
10 | traverse(contents); | 9 |
| |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 15 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 312.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | this.xmlResource = resource; | 1 | this.xmlResource = resource; | ||||||||||||
5 | init(resource, options); |
| 2 | init(resource, options); | |||||||||||
|
| 3 | @SuppressWarnings("unchecked") List<?extendsEObject> contents = roots = (List<?extendsEObject>)options.get(XMLResource.OPTION_ROOT_OBJECTS); | ||||||||||||
6 | @SuppressWarnings("unchecked") List<?extendsEObject> contents = roots = (List<?extendsEObject>)options.get(XMLResource.OPTION_ROOT_OBJECTS); |
| | ||||||||||||
7 | if (contents == null) |
| 4 | if (contents == null) | |||||||||||
8 | contents = resource.getContents(); | 5 | contents = resource.getContents(); | ||||||||||||
9 | traverse(contents); |
| 6 | traverse(contents); |
Row | Violation |
---|---|
1 | Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options |
2 | Unmatched statement @SuppressWarnings("unchecked") List<? extends EObject> contents=roots=(List<? extends EObject>)options.get(XMLResource.OPTION_ROOT_OBJECTS); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement @SuppressWarnings("unchecked") List<? extends EObject> contents=roots=(List<? extends EObject>)options.get(XMLResource.OPTION_ROOT_OBJECTS); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Type java.util.List<> of variable contents does not match with type java.util.List<> of variable contents |
5 | Type java.util.List<> of variable contents does not match with type java.util.List<> of variable contents |