if (!DialectFactory.isOracle(session.getMetaData()))
{
// Only Oracle supports materialized views directly.
return false;
}
if (matViewLookup == null)
{
initMatViewLookup(session, ti.getSchemaName());
}
return matViewLookup.contains(ti.getSimpleName());
if (!DialectFactory.isOracle(session.getMetaData()))
{
// Only Oracle supports materialized views directly.
return false;
}
if (matViewLookup == null)
{
initMatViewLookup(session, ti.getSchemaName());
}
return matViewLookup.contains(ti.getSimpleName());
Clone fragments detected by clone detection tool
File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/DropTablesCommand.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/DeleteTablesCommand.java
|
Method name: boolean isMaterializedView(ITableInfo, ISession)
|
|
Method name: boolean isMaterializedView(ITableInfo, ISession)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (!DialectFactory.isOracle(session.getMetaData()))↵ | | 1 | if (!DialectFactory.isOracle(session.getMetaData()))↵
|
2 | {↵ | | 2 | {↵
|
3 | // Only Oracle supports materialized views directly.↵ | | 3 | // Only Oracle supports materialized views directly.↵
|
4 | return false;↵ | | 4 | return false;↵
|
5 | }↵ | | 5 | }↵
|
6 | if (matViewLookup == null)↵ | | 6 | if (matViewLookup == null)↵
|
7 | {↵ | | 7 | {↵
|
8 | initMatViewLookup(session, ti.getSchemaName());↵ | | 8 | initMatViewLookup(session, ti.getSchemaName());↵
|
9 | }↵ | | 9 | }↵
|
10 | return matViewLookup.contains(ti.getSimpleName()); | | 10 | return matViewLookup.contains(ti.getSimpleName());
|
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 11 |
-
{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.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (!DialectFactory.isOracle(session.getMetaData())) | | 1 | if (!DialectFactory.isOracle(session.getMetaData())) |
2 | | | 2 | |
3 | if (matViewLookup == null) | | 3 | if (matViewLookup == null) |
4 | initMatViewLookup(session, ti.getSchemaName()); | | 4 | initMatViewLookup(session, ti.getSchemaName()); |
5 | return matViewLookup.contains(ti.getSimpleName()); | | 5 | return matViewLookup.contains(ti.getSimpleName()); |
Precondition Violations (1)
Row |
Violation |
1 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropTablesCommand and net.sourceforge.squirrel_sql.client.session.action.DeleteTablesCommand do not have a common superclass |