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(InputStream, Map,?>)
|
Method name: void doSave(OutputStream, Map,?>)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (options == null)↵ | 1 | if (options == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | options = Collections.EMPTY_MAP;↵ | 3 | options = Collections.EMPTY_MAP;↵ | |
4 | }↵ | 4 | }↵ | |
5 | ResourceHandler handler = (ResourceHandler)options.get(OPTION_RESOURCE_HANDLER);↵ | 5 | ResourceHandler handler = (ResourceHandler)options.get(OPTION_RESOURCE_HANDLER);↵ | |
6 | if (handler != null)↵ | 6 | if (handler != null)↵ | |
7 | {↵ | 7 | {↵ | |
8 | handler.preLoad(this, inputStream, options);↵ | 8 | handler.preSave(this, outputStream, options);↵ | |
9 | } | 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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 4 |
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) | 2.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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.preSave(this, outputStream, options); | ||||||||||||||||||
6 | handler.preLoad(this, inputStream, 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.preSave(this,outputStream,options); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | 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 |
8 | Clone fragment #1 returns variables options, handler , while Clone fragment #2 returns variables options, handler |