boolean result = false;
for (ITableInfo ti : tableInfos)
{
if (table.equalsIgnoreCase(ti.getSimpleName()))
{
result = true;
break;
}
}
return result;
boolean result = false;
for (ITableInfo ti : tableInfos)
{
if (table.equalsIgnoreCase(ti.getSimpleName()))
{
result = true;
break;
}
}
return result;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/util/DBUtil.java
|
|
File path: /sql12/plugins/dbdiff/src/net/sourceforge/squirrel_sql/plugins/dbdiff/util/DBUtil.java
|
Method name: boolean containsTable(List, String)
|
|
Method name: boolean containsTable(List, String)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | boolean result = false;↵ | | 1 | boolean result = false;↵
|
2 | for (ITableInfo ti : tableInfos)↵ | | 2 | for (ITableInfo ti : tableInfos)↵
|
3 | {↵ | | 3 | {↵
|
4 | if (table.equalsIgnoreCase(ti.getSimpleName()))↵ | | 4 | if (table.equalsIgnoreCase(ti.getSimpleName()))↵
|
5 | {↵ | | 5 | {↵
|
6 | result = true;↵ | | 6 | result = true;↵
|
7 | break;↵ | | 7 | break;↵
|
8 | }↵ | | 8 | }↵
|
9 | }↵ | | 9 | }↵
|
10 | return result; | | 10 | return result;
|
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | boolean result = false; | | 1 | boolean result = false; |
2 | for (ITableInfo ti : tableInfos) | | 2 | for (ITableInfo ti : tableInfos) |
3 | if (table.equalsIgnoreCase(ti.getSimpleName())) | | 3 | if (table.equalsIgnoreCase(ti.getSimpleName())) |
4 | | | 4 | |
5 | | | 5 | |
6 | return result; | | 6 | return result; |
Precondition Violations (0)
Row |
Violation |