if(SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE != _schemaDetails[i].getTable()) { SchemaTableTypeCombination buf = new SchemaTableTypeCombination(); buf.schemaName = _schemaDetails[i].getSchemaName(); buf.types = tableTypes; ret.add(buf); }
if(SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE != _schemaDetails[i].getView()) { SchemaTableTypeCombination buf = new SchemaTableTypeCombination(); buf.schemaName = _schemaDetails[i].getSchemaName(); buf.types = viewTypes; ret.add(buf); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/SQLAliasSchemaProperties.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/SQLAliasSchemaProperties.java
Method name: SchemaTableTypeCombination[] getAllSchemaTableTypeCombinationsNotToBeCached(String[], String[]) Method name: SchemaTableTypeCombination[] getAllSchemaTableTypeCombinationsNotToBeCached(String[], String[])
Number of AST nodes: 5 Number of AST nodes: 5
1
if(SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE != _schemaDetails[i].getTable())
1
if(SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE != _schemaDetails[i].getView())
2
         {
2
         {
3
            SchemaTableTypeCombination buf = new SchemaTableTypeCombination();
3
            SchemaTableTypeCombination buf = new SchemaTableTypeCombination();
4
            buf.schemaName = _schemaDetails[i].getSchemaName();
4
            buf.schemaName = _schemaDetails[i].getSchemaName();
5
            buf.types = tableTypes;
5
            buf.types = viewTypes;
6
            ret.add(buf);
6
            ret.add(buf);
7
         }
7
         }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in the same method
Number of node comparisons26
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE != _schemaDetails[i].getTable())
    3
    if (SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE != _schemaDetails[i].getTable())
    8
    if (SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE != _schemaDetails[i].getView())
    Differences
    Expression1Expression2Difference
    getTablegetViewMETHOD_INVOCATION_NAME_MISMATCH
    8
    if (SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE != _schemaDetails[i].getView())
    4
    SchemaTableTypeCombination buf = new SchemaTableTypeCombination();
    9
    SchemaTableTypeCombination buf = new SchemaTableTypeCombination();
    5
    buf.schemaName = _schemaDetails[i].getSchemaName();
    10
    buf.schemaName = _schemaDetails[i].getSchemaName();
    6
    buf.types = tableTypes;
    6
    buf.types = tableTypes;
    11
    buf.types = viewTypes;
    Differences
    Expression1Expression2Difference
    tableTypesviewTypesVARIABLE_NAME_MISMATCH
    11
    buf.types = viewTypes;
    7
    ret.add(buf);
    12
    ret.add(buf);
    Precondition Violations (0)
    Row Violation