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 doSave(OutputStream, Map,?>)
|
Method name: void doLoad(InputStream, Map,?>)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | XMLSave xmlSave = createXMLSave();↵ | 1 | XMLLoad xmlLoad = createXMLLoad();↵ | |
2 | if (options == null)↵ | 2 | if (options == null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | options = Collections.EMPTY_MAP;↵ | 4 | options = Collections.EMPTY_MAP;↵ | |
5 | }↵ | 5 | }↵ | |
6 | ResourceHandler handler = (ResourceHandler)options.get(OPTION_RESOURCE_HANDLER);↵ | 6 | ResourceHandler handler = (ResourceHandler)options.get(OPTION_RESOURCE_HANDLER);↵ | |
7 | if (handler != null)↵ | 7 | if (handler != null)↵ | |
8 | {↵ | 8 | {↵ | |
9 | handler.preSave(this, outputStream, options);↵ | 9 | handler.preLoad(this, inputStream, options);↵ | |
10 | }↵ | 10 | }↵ | |
11 | xmlSave.save(this, outputStream, options);↵ | 11 | xmlLoad.load(this, inputStream, options);↵ | |
12 | if (handler != null)↵ | 12 | if (handler != null)↵ | |
13 | {↵ | 13 | {↵ | |
14 | handler.postSave(this, outputStream, options);↵ | 14 | handler.postLoad(this, inputStream, options);↵ | |
15 | } | 15 |
| |
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 | 36 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 3.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | XMLLoad xmlLoad = createXMLLoad(); | |||||||||||||||||||
1 | XMLSave xmlSave = createXMLSave(); | | |||||||||||||||||||
2 | if (options == null) |
| 2 | if (options == null) | |||||||||||||||||
3 | options = Collections.EMPTY_MAP; | 3 | options = Collections.EMPTY_MAP; | ||||||||||||||||||
4 | ResourceHandler handler = (ResourceHandler)options.get(OPTION_RESOURCE_HANDLER); |
| 4 | ResourceHandler handler = (ResourceHandler)options.get(OPTION_RESOURCE_HANDLER); | |||||||||||||||||
5 | if (handler != null) | 5 | if (handler != null) | ||||||||||||||||||
|
| 6 | handler.preLoad(this, inputStream, options); | ||||||||||||||||||
6 | handler.preSave(this, outputStream, options); |
| | ||||||||||||||||||
| 7 | xmlLoad.load(this, inputStream, options); | |||||||||||||||||||
7 | xmlSave.save(this, outputStream, options); | | |||||||||||||||||||
8 | if (handler != null) | 8 | if (handler != null) | ||||||||||||||||||
|
| 9 | handler.postLoad(this, inputStream, options); | ||||||||||||||||||
9 | handler.postSave(this, outputStream, options); |
| |
Row | Violation |
---|---|
1 | Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options |
2 | Expression options.get(OPTION_RESOURCE_HANDLER) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression options.get(OPTION_RESOURCE_HANDLER) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type of variable options.get(OPTION_RESOURCE_HANDLER) does not match with type of variable options.get(OPTION_RESOURCE_HANDLER) |
5 | Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options |
6 | Unmatched statement handler.preLoad(this,inputStream,options); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched statement handler.preSave(this,outputStream,options); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
8 | Unmatched statement handler.postLoad(this,inputStream,options); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
9 | Unmatched statement handler.postSave(this,outputStream,options); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
10 | Clone fragment #1 returns variables options, handler , while Clone fragment #2 returns variables options, handler |