if (_contentsNbrRowsToShow != value) { final int oldValue = _contentsNbrRowsToShow; _contentsNbrRowsToShow = value; getPropertyChangeReporter().firePropertyChange( IPropertyNames.CONTENTS_NBR_ROWS_TO_SHOW, oldValue, _contentsNbrRowsToShow); }
if (_sqlResultTabLimit != value) { int oldValue = _sqlResultTabLimit; _sqlResultTabLimit = value; getPropertyChangeReporter().firePropertyChange( IPropertyNames.SQL_RESULT_TAB_LIMIT, oldValue, _sqlResultTabLimit); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/properties/SessionProperties.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/properties/SessionProperties.java
Method name: void setContentsNbrRowsToShow(int) Method name: void setSqlResultTabLimit(int)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (_contentsNbrRowsToShow != value)
1
if (_sqlResultTabLimit != value)
2
      {
2
      {
3
         final int oldValue = _contentsNbrRowsToShow;
3
         int oldValue = _
4
         _contentsNbrRowsToShow
4
sqlResultTabLimit;
5
 = value;
5
         _sqlResultTabLimit = value;
6
         getPropertyChangeReporter().firePropertyChange(
6
         getPropertyChangeReporter().firePropertyChange(
7
            IPropertyNames.CONTENTS_NBR_ROWS_TO_SHOW,
7
            IPropertyNames.SQL_RESULT_TAB_LIMIT,
8
            oldValue, _contentsNbrRowsToShow);
8
            oldValue, _sqlResultTabLimit);
9
      }
9
      }
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.1
Clones locationClones are declared in the same class
Number of node comparisons16
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (_contentsNbrRowsToShow != value)
    1
    if (_contentsNbrRowsToShow != value)
    1
    if (_sqlResultTabLimit != value)
    Differences
    Expression1Expression2Difference
    _contentsNbrRowsToShow_sqlResultTabLimitVARIABLE_NAME_MISMATCH
    1
    if (_sqlResultTabLimit != value)
                                                                          
    2
    int oldValue = _sqlResultTabLimit;
    Preondition Violations
    Unmatched statement int oldValue=_sqlResultTabLimit; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2
    int oldValue = _sqlResultTabLimit;
    2
    final int oldValue = _contentsNbrRowsToShow;
    2
    final int oldValue = _contentsNbrRowsToShow;
    Preondition Violations
    Unmatched statement final int oldValue=_contentsNbrRowsToShow; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                              
    3
    _contentsNbrRowsToShow = value;
    3
    _contentsNbrRowsToShow = value;
    3
    _sqlResultTabLimit = value;
    Differences
    Expression1Expression2Difference
    _contentsNbrRowsToShow_sqlResultTabLimitVARIABLE_NAME_MISMATCH
    3
    _sqlResultTabLimit = value;
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.CONTENTS_NBR_ROWS_TO_SHOW, oldValue, _contentsNbrRowsToShow);
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.CONTENTS_NBR_ROWS_TO_SHOW, oldValue, _contentsNbrRowsToShow);
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.SQL_RESULT_TAB_LIMIT, oldValue, _sqlResultTabLimit);
    Differences
    Expression1Expression2Difference
    CONTENTS_NBR_ROWS_TO_SHOWSQL_RESULT_TAB_LIMITVARIABLE_NAME_MISMATCH
    _contentsNbrRowsToShow_sqlResultTabLimitVARIABLE_NAME_MISMATCH
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.SQL_RESULT_TAB_LIMIT, oldValue, _sqlResultTabLimit);
    Precondition Violations (2)
    Row Violation
    1Unmatched statement int oldValue=_sqlResultTabLimit; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement final int oldValue=_contentsNbrRowsToShow; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted