if (_textLimitLineVisible != data) { final Boolean oldValue = Boolean.valueOf(_textLimitLineVisible); _textLimitLineVisible = data; getPropertyChangeReporter().firePropertyChange(IPropertyNames.TEXT_LIMIT_LINE_VISIBLE, oldValue, Boolean.valueOf(_textLimitLineVisible)); }
if (_textLimitLineWidth != data) { final Integer oldValue = Integer.valueOf(_textLimitLineWidth); _textLimitLineWidth = data; getPropertyChangeReporter().firePropertyChange(IPropertyNames.TEXT_LIMIT_LINE_WIDTH, oldValue, Integer.valueOf(_textLimitLineWidth)); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/SyntaxPreferences.java File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/SyntaxPreferences.java
Method name: void setTextLimitLineVisible(boolean) Method name: void setTextLimitLineWidth(int)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (_textLimitLineVisible != data)
1
if (_textLimitLineWidth != data)
2
      {
2
      {
3
         final Boolean oldValue = Boolean.valueOf(_textLimitLineVisible);
3
         final Integer oldValue = Integer.valueOf(_textLimitLineWidth);
4
         _textLimitLineVisible = data;
4
         _textLimitLineWidth = data;
5
         getPropertyChangeReporter().firePropertyChange(IPropertyNames.TEXT_LIMIT_LINE_VISIBLE,
5
         getPropertyChangeReporter().firePropertyChange(IPropertyNames.TEXT_LIMIT_LINE_WIDTH,
6
            oldValue, Boolean.valueOf(_textLimitLineVisible));
6
            oldValue, Integer.valueOf(_textLimitLineWidth));
7
      }
7
      }
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 declared in the same class
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (_textLimitLineVisible != data)
    1
    if (_textLimitLineVisible != data)
    1
    if (_textLimitLineWidth != data)
    Differences
    Expression1Expression2Difference
    _textLimitLineVisible_textLimitLineWidthVARIABLE_NAME_MISMATCH
    booleanintVARIABLE_TYPE_MISMATCH
    booleanintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type boolean of variable _textLimitLineVisible does not match with type int of variable _textLimitLineWidth
    Type boolean of variable data does not match with type int of variable data
    1
    if (_textLimitLineWidth != data)
                                                                                                                                  
    2
    final Integer oldValue = Integer.valueOf(_textLimitLineWidth);
    Preondition Violations
    Unmatched statement final Integer oldValue=Integer.valueOf(_textLimitLineWidth); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2
    final Integer oldValue = Integer.valueOf(_textLimitLineWidth);
    2
    final Boolean oldValue = Boolean.valueOf(_textLimitLineVisible);
    2
    final Boolean oldValue = Boolean.valueOf(_textLimitLineVisible);
    Preondition Violations
    Unmatched statement final Boolean oldValue=Boolean.valueOf(_textLimitLineVisible); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                                      
                                                            
    3
    _textLimitLineWidth = data;
    Preondition Violations
    Unmatched statement _textLimitLineWidth=data; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3
    _textLimitLineWidth = data;
    3
    _textLimitLineVisible = data;
    3
    _textLimitLineVisible = data;
    Preondition Violations
    Unmatched statement _textLimitLineVisible=data; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.TEXT_LIMIT_LINE_VISIBLE, oldValue, Boolean.valueOf(_textLimitLineVisible));
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.TEXT_LIMIT_LINE_VISIBLE, oldValue, Boolean.valueOf(_textLimitLineVisible));
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.TEXT_LIMIT_LINE_WIDTH, oldValue, Integer.valueOf(_textLimitLineWidth));
    Differences
    Expression1Expression2Difference
    TEXT_LIMIT_LINE_VISIBLETEXT_LIMIT_LINE_WIDTHVARIABLE_NAME_MISMATCH
    java.lang.Booleanjava.lang.IntegerVARIABLE_TYPE_MISMATCH
    _textLimitLineVisible_textLimitLineWidthVARIABLE_NAME_MISMATCH
    booleanintVARIABLE_TYPE_MISMATCH
    java.lang.Booleanjava.lang.IntegerVARIABLE_TYPE_MISMATCH
    java.lang.Booleanjava.lang.IntegerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Boolean of variable oldValue does not match with type java.lang.Integer of variable oldValue
    • Make classes java.lang.Boolean and java.lang.Integer extend a common superclass
    Type boolean of variable _textLimitLineVisible does not match with type int of variable _textLimitLineWidth
    Expression Boolean.valueOf(_textLimitLineVisible) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression Integer.valueOf(_textLimitLineWidth) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.Boolean of variable Boolean.valueOf(_textLimitLineVisible) does not match with type java.lang.Integer of variable Integer.valueOf(_textLimitLineWidth)
    • Make classes java.lang.Boolean and java.lang.Integer extend a common superclass
    Type java.lang.Boolean does not match with type java.lang.Integer
    • Make classes java.lang.Boolean and java.lang.Integer extend a common superclass
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.TEXT_LIMIT_LINE_WIDTH, oldValue, Integer.valueOf(_textLimitLineWidth));
    Precondition Violations (12)
    Row Violation
    1Type boolean of variable _textLimitLineVisible does not match with type int of variable _textLimitLineWidth
    2Type boolean of variable data does not match with type int of variable data
    3Unmatched statement final Integer oldValue=Integer.valueOf(_textLimitLineWidth); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement final Boolean oldValue=Boolean.valueOf(_textLimitLineVisible); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5Unmatched statement _textLimitLineWidth=data; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched statement _textLimitLineVisible=data; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    7Type java.lang.Boolean of variable oldValue does not match with type java.lang.Integer of variable oldValue
    8Type boolean of variable _textLimitLineVisible does not match with type int of variable _textLimitLineWidth
    9Expression Boolean.valueOf(_textLimitLineVisible) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression Integer.valueOf(_textLimitLineWidth) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Type java.lang.Boolean of variable Boolean.valueOf(_textLimitLineVisible) does not match with type java.lang.Integer of variable Integer.valueOf(_textLimitLineWidth)
    12Type java.lang.Boolean does not match with type java.lang.Integer