if (_session != null) { new CreateTableOfCurrentSQLCommand(_session, _plugin).execute(); }
if(SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE ==_schemaDetails[i].getTable() || SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE ==_schemaDetails[i].getView() || SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE ==_schemaDetails[i].getProcedure()) { return true; }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/sqlscript/src/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/CreateTableOfCurrentSQLAction.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/SQLAliasSchemaProperties.java
Method name: void actionPerformed(ActionEvent) Method name: boolean getExpectsSomeCachedData()
Number of AST nodes: 2 Number of AST nodes: 2
1
if (_session != null)
1
if(SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE ==_schemaDetails[i].getTable() ||
2
      {
2
      
3
         new CreateTableOfCurrentSQLCommand(_session, _plugin).execute();
3
         
4
SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE ==_schemaDetails[i].getView() ||
5
               SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE ==_schemaDetails[i].getProcedure())
6
            {
7
               return true;
4
      }
8
            }
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.2
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (_session != null)
    1
    if (_session != null)
    5
    if (SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE == _schemaDetails[i].getTable() || SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE == _schemaDetails[i].getView() || SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE == _schemaDetails[i].getProcedure())
    Differences
    Expression1Expression2Difference
    !=||OPERATOR_MISMATCH
    _sessionSQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE == _schemaDetails[i].getTable() || SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE == _schemaDetails[i].getView()INFIX_LEFT_OPERAND_MISMATCH
    nullSQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE == _schemaDetails[i].getProcedure()INFIX_RIGHT_OPERAND_MISMATCH
    5
    if (SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE == _schemaDetails[i].getTable() || SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE == _schemaDetails[i].getView() || SQLAliasSchemaDetailProperties.SCHEMA_LOADING_ID_LOAD_AND_CACHE == _schemaDetails[i].getProcedure())
    2
    new CreateTableOfCurrentSQLCommand(_session, _plugin).execute();
    2
    new CreateTableOfCurrentSQLCommand(_session, _plugin).execute();
    Preondition Violations
    Unmatched statement new CreateTableOfCurrentSQLCommand(_session,_plugin).execute(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                                        
                                  
    6
    return true;
    Preondition Violations
    Unmatched return true;
    6
    return true;
    Precondition Violations (3)
    Row Violation
    1Unmatched statement new CreateTableOfCurrentSQLCommand(_session,_plugin).execute(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched return true;
    3The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero