if(!enabled)
return;
mkdirs(directory);
String name = installer.getProperty("app.name");
if(!enabled)
return;
mkdirs(directory);
String name = installer.getProperty("app.name");
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/installer/OperatingSystem.java
|
|
File path: /jEdit-4.2/src/installer/OperatingSystem.java
|
Method name: void perform(String, Vector)
|
|
Method name: void perform(String, Vector)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if(!enabled)↵ | | 1 | if(!enabled)↵
|
2 | return;↵ | | 2 | return;↵
|
|
3 | mkdirs(directory);↵ | | 3 | mkdirs(directory);↵
|
|
4 | String name = installer.getProperty("app.name"); | | 4 | String name = installer.getProperty("app.name");
|
See real code fragment |
|
See real code fragment |
Summary
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 in the same java file |
Number of node comparisons | 8 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
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.7 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (!enabled) | | 1 | if (!enabled) |
2 | | | 2 | |
3 | mkdirs(directory); | | 3 | mkdirs(directory); |
4 | String name = installer.getProperty("app.name"); | | 4 | String name = installer.getProperty("app.name"); |
Precondition Violations (3)
Row |
Violation |
1 | Conditional return; |
2 | Conditional return; |
3 | Clone fragment #1 returns variables name , while Clone fragment #2 returns variables |