File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/URIConverterImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/URIConverterImpl.java | |||
Method name: OutputStream createPlatformResourceOutputStream(String)
|
Method name: InputStream createPlatformResourceInputStream(String)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (workspaceRoot != null)↵ | 1 | if (workspaceRoot != null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | return WorkbenchHelper.createPlatformResourceOutputStream(platformResourcePath);↵ | 3 | return WorkbenchHelper.createPlatformResourceInputStream(platformResourcePath);↵ | |
4 | }↵ | 4 | }↵ | |
5 | else↵ | 5 | else↵ | |
6 | // ECLIPSE-DEPEND-END↵ | 6 | // ECLIPSE-DEPEND-END↵ | |
7 | {↵ | 7 | {↵ | |
8 | URI resolvedLocation = EcorePlugin.resolvePlatformResourcePath(platformResourcePath);↵ | 8 | URI resolvedLocation = EcorePlugin.resolvePlatformResourcePath(platformResourcePath);↵ | |
9 | if (resolvedLocation != null)↵ | 9 | if (resolvedLocation != null)↵ | |
10 | {↵ | 10 | {↵ | |
11 | return createOutputStream(resolvedLocation);↵ | 11 | return createInputStream(resolvedLocation);↵ | |
12 | }↵ | 12 | }↵ | |
13 | throw new IOException("The path '" + platformResourcePath + "' is unmapped");↵ | 13 | throw new IOException("The path '" + platformResourcePath + "' is unmapped");↵ | |
14 | } | 14 |
| |
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 | 20 |
Number of mapped statements | 4 |
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.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
1 | if (workspaceRoot != null) | 1 | if (workspaceRoot != null) | |||||
|
| 2 | return WorkbenchHelper.createPlatformResourceInputStream(platformResourcePath); | |||||
2 | return WorkbenchHelper.createPlatformResourceOutputStream(platformResourcePath); |
| | |||||
else | else | |||||||
3 | URI resolvedLocation = EcorePlugin.resolvePlatformResourcePath(platformResourcePath); | 3 | URI resolvedLocation = EcorePlugin.resolvePlatformResourcePath(platformResourcePath); | |||||
4 | if (resolvedLocation != null) | 4 | if (resolvedLocation != null) | |||||
|
| 5 | return createInputStream(resolvedLocation); | |||||
5 | return createOutputStream(resolvedLocation); |
| | |||||
6 | throw new IOException("The path '" + platformResourcePath + "' is unmapped"); | 6 | throw new IOException("The path '" + platformResourcePath + "' is unmapped"); |
Row | Violation |
---|---|
1 | Unmatched return WorkbenchHelper.createPlatformResourceInputStream(platformResourcePath); |
2 | Unmatched return WorkbenchHelper.createPlatformResourceOutputStream(platformResourcePath); |
3 | Unmatched statement return createInputStream(resolvedLocation); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched return createInputStream(resolvedLocation); |
5 | Unmatched statement return createOutputStream(resolvedLocation); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched return createOutputStream(resolvedLocation); |