final int oldValue = _loginTimeout; _loginTimeout = data; getPropertyChangeReporter().firePropertyChange(IPropertyNames.LOGIN_TIMEOUT, oldValue, _loginTimeout);
final boolean oldValue = _contentsLimitRows; _contentsLimitRows = value; getPropertyChangeReporter().firePropertyChange( IPropertyNames.CONTENTS_LIMIT_ROWS, oldValue, _contentsLimitRows);
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/session/properties/SessionProperties.java
Method name: void setLoginTimeout(int) Method name: void setContentsLimitRows(boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
final int oldValue = _loginTimeout;
1
final boolean oldValue = _
2
			_loginTimeout = data;
3
			
2
contentsLimitRows;
3
         _contentsLimitRows = value;
4
getPropertyChangeReporter().firePropertyChange(
4
         getPropertyChangeReporter().firePropertyChange(
5
IPropertyNames.LOGIN_TIMEOUT,
5
            IPropertyNames.
6
												oldValue, _loginTimeout
6
CONTENTS_LIMIT_ROWS,
7
);
7
            oldValue, _contentsLimitRows);
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.0
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)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                              
    2
    final boolean oldValue = _contentsLimitRows;
    2
    final int oldValue = _loginTimeout;
                                                                            
                                                            
    3
    _contentsLimitRows = value;
    Preondition Violations
    Unmatched statement _contentsLimitRows=value; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3
    _contentsLimitRows = value;
    3
    _loginTimeout = data;
    3
    _loginTimeout = data;
    Preondition Violations
    Unmatched statement _loginTimeout=data; cannot be moved before the extracted code, because it has control dependencies 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.CONTENTS_LIMIT_ROWS, oldValue, _contentsLimitRows);
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.preferences.SquirrelPreferences.IPropertyNamesnet.sourceforge.squirrel_sql.client.session.properties.SessionProperties.IPropertyNamesVARIABLE_TYPE_MISMATCH
    LOGIN_TIMEOUTCONTENTS_LIMIT_ROWSVARIABLE_NAME_MISMATCH
    intbooleanVARIABLE_TYPE_MISMATCH
    _loginTimeout_contentsLimitRowsVARIABLE_NAME_MISMATCH
    intbooleanVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.preferences.SquirrelPreferences.IPropertyNames does not match with type net.sourceforge.squirrel_sql.client.session.properties.SessionProperties.IPropertyNames
    • Make classes net.sourceforge.squirrel_sql.client.preferences.SquirrelPreferences.IPropertyNames and net.sourceforge.squirrel_sql.client.session.properties.SessionProperties.IPropertyNames extend a common superclass
    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 _contentsLimitRows
    4
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.CONTENTS_LIMIT_ROWS, oldValue, _contentsLimitRows);
    Precondition Violations (5)
    Row Violation
    1Unmatched statement _contentsLimitRows=value; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement _loginTimeout=data; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Type net.sourceforge.squirrel_sql.client.preferences.SquirrelPreferences.IPropertyNames does not match with type net.sourceforge.squirrel_sql.client.session.properties.SessionProperties.IPropertyNames
    4Type int of variable oldValue does not match with type boolean of variable oldValue
    5Type int of variable _loginTimeout does not match with type boolean of variable _contentsLimitRows