String parent = file.getParent();
if (parent != null)
{
new File(parent).mkdirs();
}
String parent = file.getParent();
if (parent != null)
{
new File(parent).mkdirs();
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/FileURIHandlerImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/URIConverterImpl.java
|
Method name: OutputStream createOutputStream(URI, Map,?>)
|
|
Method name: OutputStream createFileOutputStream(String)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | String parent = file.getParent();↵ | | 1 | String parent = file.getParent();↵
|
2 | if (parent != null)↵ | | 2 | if (parent != null)↵
|
3 | {↵ | | 3 | {↵
|
4 | new File(parent).mkdirs();↵ | | 4 | new File(parent).mkdirs();↵
|
5 | } | | 5 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | String parent = file.getParent(); | | 2 | String parent = file.getParent(); |
4 | if (parent != null) | | 3 | if (parent != null) |
5 | new File(parent).mkdirs(); | | 4 | new File(parent).mkdirs(); |
Precondition Violations (0)
Row |
Violation |