if (data != _confirmSessionClose) { final boolean oldValue = _confirmSessionClose; _confirmSessionClose = data; getPropertyChangeReporter().firePropertyChange( IPropertyNames.CONFIRM_SESSION_CLOSE, oldValue, _confirmSessionClose); }
if (data != _loginTimeout) { final int oldValue = _loginTimeout; _loginTimeout = data; getPropertyChangeReporter().firePropertyChange(IPropertyNames.LOGIN_TIMEOUT, oldValue, _loginTimeout); }
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 setConfirmSessionClose(boolean) Method name: void setLoginTimeout(int)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (data != _confirmSessionClose)
1
if (data != _loginTimeout)
2
 		{
2
		{
3
 			final boolean oldValue = _confirmSessionClose;
3
			final int oldValue = _loginTimeout;
4
 			_confirmSessionClose = data;
4
			_loginTimeout = data;
5
 			getPropertyChangeReporter().firePropertyChange(
5
			getPropertyChangeReporter().firePropertyChange(
6
 										IPropertyNames.CONFIRM_SESSION_CLOSE,
6
IPropertyNames.
7
 
7
LOGIN_TIMEOUT,
8
										oldValue, _confirmSessionClose);
8
												oldValue, _loginTimeout);
9
 		}
9
		}
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 != _confirmSessionClose)
    1
    if (data != _confirmSessionClose)
    1
    if (data != _loginTimeout)
    Differences
    Expression1Expression2Difference
    booleanintVARIABLE_TYPE_MISMATCH
    _confirmSessionClose_loginTimeoutVARIABLE_NAME_MISMATCH
    booleanintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type boolean of variable data does not match with type int of variable data
    Type boolean of variable _confirmSessionClose does not match with type int of variable _loginTimeout
    1
    if (data != _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
    2
    final int oldValue = _loginTimeout;
    2
    final boolean oldValue = _confirmSessionClose;
    2
    final boolean oldValue = _confirmSessionClose;
    Preondition Violations
    Unmatched statement final boolean oldValue=_confirmSessionClose; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                  
                                                
    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
    3
    _loginTimeout = data;
    3
    _confirmSessionClose = data;
    3
    _confirmSessionClose = data;
    Preondition Violations
    Unmatched statement _confirmSessionClose=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.CONFIRM_SESSION_CLOSE, oldValue, _confirmSessionClose);
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.CONFIRM_SESSION_CLOSE, oldValue, _confirmSessionClose);
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.LOGIN_TIMEOUT, oldValue, _loginTimeout);
    Differences
    Expression1Expression2Difference
    CONFIRM_SESSION_CLOSELOGIN_TIMEOUTVARIABLE_NAME_MISMATCH
    booleanintVARIABLE_TYPE_MISMATCH
    _confirmSessionClose_loginTimeoutVARIABLE_NAME_MISMATCH
    booleanintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type boolean of variable oldValue does not match with type int of variable oldValue
    Type boolean of variable _confirmSessionClose does not match with type int of variable _loginTimeout
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.LOGIN_TIMEOUT, oldValue, _loginTimeout);
    Precondition Violations (8)
    Row Violation
    1Type boolean of variable data does not match with type int of variable data
    2Type boolean of variable _confirmSessionClose does not match with type int of variable _loginTimeout
    3Unmatched statement final int oldValue=_loginTimeout; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement final boolean oldValue=_confirmSessionClose; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5Unmatched statement _loginTimeout=data; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched statement _confirmSessionClose=data; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    7Type boolean of variable oldValue does not match with type int of variable oldValue
    8Type boolean of variable _confirmSessionClose does not match with type int of variable _loginTimeout