if(_viewAsTree) { return _jTreeImpl; } else { return _jListImpl; }
if(zoomEnabled) { return _txtZoomColumns; } else { return _txtColumns; }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/AliasesList.java File path: /sql12/plugins/graph/src/net/sourceforge/squirrel_sql/plugins/graph/GraphTextAreaFactory.java
Method name: IAliasesList getCurrentImpl() Method name: JComponent getComponent(boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
if(_viewAsTree)
1
if(zoomEnabled)
2
      {
2
      {
3
         return _jTreeImpl;
3
         return _txtZoomColumns;
4
      }
4
      }
5
      else
5
      else
6
      {
6
      {
7
         return _jListImpl;
7
         return _txtColumns;
8
      }
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.1
Clones locationClones are in different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (_viewAsTree)
    1
    if (_viewAsTree)
    1
    if (zoomEnabled)
    Differences
    Expression1Expression2Difference
    _viewAsTreezoomEnabledVARIABLE_NAME_MISMATCH
    1
    if (zoomEnabled)
                                                        
    2
    return _txtZoomColumns;
    Preondition Violations
    Unmatched return _txtZoomColumns;
    2
    return _txtZoomColumns;
    2
    return _jTreeImpl;
    2
    return _jTreeImpl;
    Preondition Violations
    Unmatched return _jTreeImpl;
                                              
    else
            
                                                
    3
    return _txtColumns;
    Preondition Violations
    Unmatched return _txtColumns;
    3
    return _txtColumns;
    3
    return _jListImpl;
    3
    return _jListImpl;
    Preondition Violations
    Unmatched return _jListImpl;
                                              
    Precondition Violations (5)
    Row Violation
    1Unmatched return _txtZoomColumns;
    2Unmatched return _jTreeImpl;
    3Unmatched return _txtColumns;
    4Unmatched return _jListImpl;
    5The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero