boolean result = true;
DatabaseObjectType type = info.getDatabaseObjectType();
if (type.getName().equalsIgnoreCase("database"))
{
result = false;
}
return result;
boolean result = true;
DatabaseObjectType type = info.getDatabaseObjectType();
if (type.getName().equalsIgnoreCase("database"))
{
result = false;
}
return result;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/HSQLDialectExt.java
|
|
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/PostgreSQLDialectExt.java
|
Method name: boolean canPasteTo(IDatabaseObjectInfo)
|
|
Method name: boolean canPasteTo(IDatabaseObjectInfo)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | boolean result = true;↵ | | 1 | boolean result = true;↵
|
2 | DatabaseObjectType type = info.getDatabaseObjectType();↵ | | 2 | DatabaseObjectType type = info.getDatabaseObjectType();↵
|
3 | if (type.getName().equalsIgnoreCase("database"))↵ | | 3 | if (type.getName().equalsIgnoreCase("database"))↵
|
4 | {↵ | | 4 | {↵
|
5 | result = false;↵ | | 5 | result = false;↵
|
6 | }↵ | | 6 | }↵
|
7 | return result; | | 7 | 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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 13 |
-
{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) | 0.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | boolean result = true; | | 1 | boolean result = true; |
2 | DatabaseObjectType type = info.getDatabaseObjectType(); | | 2 | DatabaseObjectType type = info.getDatabaseObjectType(); |
3 | if (type.getName().equalsIgnoreCase("database")) | | 3 | if (type.getName().equalsIgnoreCase("database")) |
4 | | | 4 | |
5 | return result; | | 5 | return result; |
Precondition Violations (0)
Row |
Violation |