for (int i = 0; i < count; i++)
{
sb.append(buf[i]);
}
if(count < 50)
{
break;
}
count = reader.read(buf);
for (int i = 0; i < count; i++)
{
sb.append(buf[i]);
}
if(count < 50)
{
break;
}
count = reader.read(buf);
Clone fragments detected by clone detection tool
File path: /sql12/plugins/cache/src/de/ixdb/squirrel_sql/plugins/cache/CdlAccessor.java
|
|
File path: /sql12/plugins/cache/src/de/ixdb/squirrel_sql/plugins/cache/ShowQueryPlanCommand.java
|
Method name: String getDefinition(String, Connection)
|
|
Method name: String getExecutionPlanXmlFromCache(String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | for (int i = 0; i < count; i++)↵ | | 1 | for (int i = 0; i < count; i++)↵
|
2 | {↵ | | 2 | {↵
|
3 | sb.append(buf[i]);↵ | | 3 | sb.append(buf[i]);↵
|
4 | }↵ | | 4 | }↵
|
|
5 | if(count < 50)↵ | | 5 | if(count < 50)↵
|
6 | {↵ | | 6 | {↵
|
7 | break;↵ | | 7 | break;↵
|
8 | }↵ | | 8 | }↵
|
|
9 | count = reader.read(buf); | | 9 | count = reader.read(buf);
|
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 14 |
-
{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) | 2.7 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
16 | for (int i = 0; i < count; i++) | | 16 | for (int i = 0; i < count; i++) |
17 | | | 17 | |
18 | if (count < 50) | | 18 | if (count < 50) |
19 | | | 19 | |
20 | count = reader.read(buf); | | 20 | count = reader.read(buf); |
Precondition Violations (2)
Row |
Violation |
1 | Statement break; without innermost loop |
2 | Statement break; without innermost loop |