if(iProcedureInfo instanceof DatabaseObjectInfo) { ((DatabaseObjectInfo)iProcedureInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM(DatabaseObjectType.PROCEDURE); }
if(iTableInfo instanceof TableInfo) { ((TableInfo)iTableInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM(); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfoCache.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfoCache.java
Method name: void replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM() Method name: void replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM()
Number of AST nodes: 2 Number of AST nodes: 2
1
if(iProcedureInfo instanceof DatabaseObjectInfo)
1
if(iTableInfo instanceof TableInfo)
2
         {
2
         {
3
            ((DatabaseObjectInfo)iProcedureInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM(DatabaseObjectType.PROCEDURE);
3
            ((TableInfo)iTableInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM();
4
         }
4
         }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in the same method
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    if (iProcedureInfo instanceof DatabaseObjectInfo)
    5
    if (iProcedureInfo instanceof DatabaseObjectInfo)
    2
    if (iTableInfo instanceof TableInfo)
    Differences
    Expression1Expression2Difference
    iProcedureInfoiTableInfoVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.sql.IProcedureInfonet.sourceforge.squirrel_sql.fw.sql.ITableInfoSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.fw.sql.DatabaseObjectInfonet.sourceforge.squirrel_sql.fw.sql.TableInfoSUBCLASS_TYPE_MISMATCH
    2
    if (iTableInfo instanceof TableInfo)
    6
    ((DatabaseObjectInfo)iProcedureInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM(DatabaseObjectType.PROCEDURE);
    6
    ((DatabaseObjectInfo)iProcedureInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM(DatabaseObjectType.PROCEDURE);
    3
    ((TableInfo)iTableInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM();
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.fw.sql.DatabaseObjectInfonet.sourceforge.squirrel_sql.fw.sql.TableInfoSUBCLASS_TYPE_MISMATCH
    iProcedureInfoiTableInfoVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.sql.IProcedureInfonet.sourceforge.squirrel_sql.fw.sql.ITableInfoSUBCLASS_TYPE_MISMATCH
    ((DatabaseObjectInfo)iProcedureInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM(DatabaseObjectType.PROCEDURE)((TableInfo)iTableInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM()ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression (DatabaseObjectInfo)iProcedureInfo cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (TableInfo)iTableInfo cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (DatabaseObjectInfo)iProcedureInfo cannot be unified with expression (TableInfo)iTableInfo , because common superclass net.sourceforge.squirrel_sql.fw.sql.DatabaseObjectInfo does not declare member(s) public void replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM()
    Expression ((DatabaseObjectInfo)iProcedureInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM(DatabaseObjectType.PROCEDURE) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ((TableInfo)iTableInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ((DatabaseObjectInfo)iProcedureInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM(DatabaseObjectType.PROCEDURE) is a void method call, and thus it cannot be parameterized
    Expression ((TableInfo)iTableInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM() is a void method call, and thus it cannot be parameterized
    3
    ((TableInfo)iTableInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM();
    Precondition Violations (7)
    Row Violation
    1Expression (DatabaseObjectInfo)iProcedureInfo cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression (TableInfo)iTableInfo cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression (DatabaseObjectInfo)iProcedureInfo cannot be unified with expression (TableInfo)iTableInfo , because common superclass net.sourceforge.squirrel_sql.fw.sql.DatabaseObjectInfo does not declare member(s) public void replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM()
    4Expression ((DatabaseObjectInfo)iProcedureInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM(DatabaseObjectType.PROCEDURE) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression ((TableInfo)iTableInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression ((DatabaseObjectInfo)iProcedureInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM(DatabaseObjectType.PROCEDURE) is a void method call, and thus it cannot be parameterized
    7Expression ((TableInfo)iTableInfo).replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM() is a void method call, and thus it cannot be parameterized