File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/PlatformResourceURIHandlerImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/PlatformResourceURIHandlerImpl.java | |||
Method name: boolean exists(URI, Map,?>)
|
Method name: Map
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | String platformResourcePath = uri.toPlatformString(true);↵ | 1 | String platformResourcePath = uri.toPlatformString(true);↵ | |
2 | if (workspaceRoot != null)↵ | 2 | if (workspaceRoot != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | return WorkbenchHelper.exists(platformResourcePath, options);↵ | 4 | return WorkbenchHelper.attributes(platformResourcePath, options);↵ | |
5 | }↵ | 5 | }↵ | |
6 | else↵ | 6 | else↵ | |
7 | {↵ | 7 | {↵ | |
8 | URI resolvedLocation = EcorePlugin.resolvePlatformResourcePath(platformResourcePath);↵ | 8 | URI resolvedLocation = EcorePlugin.resolvePlatformResourcePath(platformResourcePath);↵ | |
9 | return resolvedLocation != null && getURIConverter(options).exists(resolvedLocation, options);↵ | 9 | return resolvedLocation == null ? Collections.<String, Object>emptyMap() : getURIConverter(options).getAttributes(resolvedLocation, options);↵ | |
10 | } | 10 |
| |
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 | 17 |
Number of mapped statements | 3 |
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.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
1 | String platformResourcePath = uri.toPlatformString(true); | 1 | String platformResourcePath = uri.toPlatformString(true); | |||||
2 | if (workspaceRoot != null) | 2 | if (workspaceRoot != null) | |||||
|
| 3 | return WorkbenchHelper.attributes(platformResourcePath, options); | |||||
3 | return WorkbenchHelper.exists(platformResourcePath, options); |
| | |||||
else | else | |||||||
4 | URI resolvedLocation = EcorePlugin.resolvePlatformResourcePath(platformResourcePath); | 4 | URI resolvedLocation = EcorePlugin.resolvePlatformResourcePath(platformResourcePath); | |||||
| 5 | return resolvedLocation == null ? Collections.<String, Object>emptyMap() : getURIConverter(options).getAttributes(resolvedLocation, options); | ||||||
5 | return resolvedLocation != null && getURIConverter(options).exists(resolvedLocation, options); | |
Row | Violation |
---|---|
1 | Unmatched statement return WorkbenchHelper.attributes(platformResourcePath,options); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched return WorkbenchHelper.attributes(platformResourcePath,options); |
3 | Unmatched statement return WorkbenchHelper.exists(platformResourcePath,options); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched return WorkbenchHelper.exists(platformResourcePath,options); |
5 | Clone fragment #1 returns variables platformResourcePath, resolvedLocation , while Clone fragment #2 returns variables platformResourcePath, resolvedLocation |