if (data != _loginTimeout) { final int oldValue = _loginTimeout; _loginTimeout = data; getPropertyChangeReporter().firePropertyChange(IPropertyNames.LOGIN_TIMEOUT, oldValue, _loginTimeout); }
if (data != _showContentsWhenDragging) { final boolean oldValue = _showContentsWhenDragging; _showContentsWhenDragging = data; getPropertyChangeReporter().firePropertyChange(IPropertyNames.SHOW_CONTENTS_WHEN_DRAGGING, oldValue, _showContentsWhenDragging); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/preferences/SquirrelPreferences.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/preferences/SquirrelPreferences.java
Method name: void setLoginTimeout(int) Method name: void setShowContentsWhenDragging(boolean)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (data != _loginTimeout)
1
if (data != _showContentsWhenDragging)
2
		{
2
		{
3
			final int oldValue = _loginTimeout;
3
			final boolean oldValue = _
4
			_loginTimeout
4
showContentsWhenDragging;
5
 = data;
5
			_showContentsWhenDragging = data;
6
			getPropertyChangeReporter().firePropertyChange(IPropertyNames.LOGIN_TIMEOUT,
6
			getPropertyChangeReporter().firePropertyChange(IPropertyNames.SHOW_CONTENTS_WHEN_DRAGGING,
7
												oldValue, _loginTimeout);
7
												oldValue, _showContentsWhenDragging);
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 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.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (data != _loginTimeout)
    1
    if (data != _loginTimeout)
    1
    if (data != _showContentsWhenDragging)
    Differences
    Expression1Expression2Difference
    intbooleanVARIABLE_TYPE_MISMATCH
    _loginTimeout_showContentsWhenDraggingVARIABLE_NAME_MISMATCH
    intbooleanVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type int of variable data does not match with type boolean of variable data
    Type int of variable _loginTimeout does not match with type boolean of variable _showContentsWhenDragging
    1
    if (data != _showContentsWhenDragging)
                                                                                                            
    2
    final boolean oldValue = _showContentsWhenDragging;
    Preondition Violations
    Unmatched statement final boolean oldValue=_showContentsWhenDragging; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2
    final boolean oldValue = _showContentsWhenDragging;
    2
    final int oldValue = _loginTimeout;
    2
    final int oldValue = _loginTimeout;
    Preondition Violations
    Unmatched statement final int oldValue=_loginTimeout; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                            
                                                                        
    3
    _showContentsWhenDragging = data;
    Preondition Violations
    Unmatched statement _showContentsWhenDragging=data; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3
    _showContentsWhenDragging = data;
    3
    _loginTimeout = data;
    3
    _loginTimeout = data;
    Preondition Violations
    Unmatched statement _loginTimeout=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.LOGIN_TIMEOUT, oldValue, _loginTimeout);
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.LOGIN_TIMEOUT, oldValue, _loginTimeout);
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.SHOW_CONTENTS_WHEN_DRAGGING, oldValue, _showContentsWhenDragging);
    Differences
    Expression1Expression2Difference
    LOGIN_TIMEOUTSHOW_CONTENTS_WHEN_DRAGGINGVARIABLE_NAME_MISMATCH
    intbooleanVARIABLE_TYPE_MISMATCH
    _loginTimeout_showContentsWhenDraggingVARIABLE_NAME_MISMATCH
    intbooleanVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type int of variable oldValue does not match with type boolean of variable oldValue
    Type int of variable _loginTimeout does not match with type boolean of variable _showContentsWhenDragging
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.SHOW_CONTENTS_WHEN_DRAGGING, oldValue, _showContentsWhenDragging);
    Precondition Violations (8)
    Row Violation
    1Type int of variable data does not match with type boolean of variable data
    2Type int of variable _loginTimeout does not match with type boolean of variable _showContentsWhenDragging
    3Unmatched statement final boolean oldValue=_showContentsWhenDragging; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement final int oldValue=_loginTimeout; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5Unmatched statement _showContentsWhenDragging=data; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched statement _loginTimeout=data; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    7Type int of variable oldValue does not match with type boolean of variable oldValue
    8Type int of variable _loginTimeout does not match with type boolean of variable _showContentsWhenDragging