String fileset = installer.getProperty("comp." + i + ".fileset");
String osDep = installer.getProperty("comp." + i + ".os");
if(osDep != null)
{
if(!os.getClass().getName().endsWith(osDep))
{
continue;
}
}
String fileset = installer.getProperty("comp." + i + ".fileset");
String osDep = installer.getProperty("comp." + i + ".os");
if(osDep != null)
{
if(!os.getClass().getName().endsWith(osDep))
{
continue;
}
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/installer/ConsoleInstall.java
|
|
File path: /jEdit-4.2/src/installer/NonInteractiveInstall.java
|
Method name: void ConsoleInstall()
|
|
Method name: void NonInteractiveInstall(String[])
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | String fileset = installer.getProperty("comp." + i + ".fileset");↵ | | 1 | String fileset = installer.getProperty("comp." + i + ".fileset");↵
|
|
2 | String osDep = installer.getProperty("comp." + i + ".os");↵ | | 2 | String osDep = installer.getProperty("comp." + i + ".os");↵
|
3 | if(osDep != null)↵ | | 3 | if(osDep != null)↵
|
4 | {↵ | | 4 | {↵
|
5 | if(!os.getClass().getName().endsWith(osDep))↵ | | 5 | if(!os.getClass().getName().endsWith(osDep))↵
|
6 | {↵ | | 6 | {↵
|
7 | continue;↵ | | 7 | continue;↵
|
8 | }↵ | | 8 | }↵
|
9 | } | | 9 | }
|
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.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 10 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 1.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
31 | String fileset = installer.getProperty("comp." + i + ".fileset"); | | 24 | String fileset = installer.getProperty("comp." + i + ".fileset"); |
32 | String osDep = installer.getProperty("comp." + i + ".os"); | | 25 | String osDep = installer.getProperty("comp." + i + ".os"); |
33 | if (osDep != null) | | 26 | if (osDep != null) |
34 | if (!os.getClass().getName().endsWith(osDep)) | | 27 | if (!os.getClass().getName().endsWith(osDep)) |
35 | | | 28 | |
Precondition Violations (2)
Row |
Violation |
1 | Statement continue; without innermost loop |
2 | Statement continue; without innermost loop |