if (_autoLogon != value) { _autoLogon = value; getPropertyChangeReporter().firePropertyChange(IPropNames.AUTO_LOGON, !_autoLogon, _autoLogon); }
if (_writeSQLErrorsToLog != value) { _writeSQLErrorsToLog = value; getPropertyChangeReporter().firePropertyChange( IPropertyNames.WRITE_SQL_ERRORS_TO_LOG, !_writeSQLErrorsToLog, _writeSQLErrorsToLog); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/SQLAlias.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/properties/SessionProperties.java
Method name: void setAutoLogon(boolean) Method name: void setWriteSQLErrorsToLog(boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (_autoLogon != value)
1
if (_writeSQLErrorsToLog != value)
2
      {
2
      {
3
         _autoLogon = value;
3
         _writeSQLErrorsToLog = value;
4
         getPropertyChangeReporter().firePropertyChange(
4
         getPropertyChangeReporter().firePropertyChange(
5
IPropNames.AUTO_LOGON,
5
            IPropertyNames.
6
                                    !_aut
6
WRITE_SQL_ERRORS_TO_LOG,
7
oLogon, _autoLogon);
7
            !_writeSQLErrorsToLog, _writeSQLErrorsToLog);
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 in different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (_autoLogon != value)
    1
    if (_autoLogon != value)
    1
    if (_writeSQLErrorsToLog != value)
    Differences
    Expression1Expression2Difference
    _autoLogon_writeSQLErrorsToLogVARIABLE_NAME_MISMATCH
    1
    if (_writeSQLErrorsToLog != value)
    2
    _autoLogon = value;
    2
    _autoLogon = value;
    2
    _writeSQLErrorsToLog = value;
    Differences
    Expression1Expression2Difference
    _autoLogon_writeSQLErrorsToLogVARIABLE_NAME_MISMATCH
    2
    _writeSQLErrorsToLog = value;
    3
    getPropertyChangeReporter().firePropertyChange(IPropNames.AUTO_LOGON, !_autoLogon, _autoLogon);
    3
    getPropertyChangeReporter().firePropertyChange(IPropNames.AUTO_LOGON, !_autoLogon, _autoLogon);
    3
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.WRITE_SQL_ERRORS_TO_LOG, !_writeSQLErrorsToLog, _writeSQLErrorsToLog);
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.gui.db.SQLAlias.IPropNamesnet.sourceforge.squirrel_sql.client.session.properties.SessionProperties.IPropertyNamesVARIABLE_TYPE_MISMATCH
    AUTO_LOGONWRITE_SQL_ERRORS_TO_LOGVARIABLE_NAME_MISMATCH
    _autoLogon_writeSQLErrorsToLogVARIABLE_NAME_MISMATCH
    _autoLogon_writeSQLErrorsToLogVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.gui.db.SQLAlias.IPropNames does not match with type net.sourceforge.squirrel_sql.client.session.properties.SessionProperties.IPropertyNames
    • Make classes net.sourceforge.squirrel_sql.client.gui.db.SQLAlias.IPropNames and net.sourceforge.squirrel_sql.client.session.properties.SessionProperties.IPropertyNames extend a common superclass
    3
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.WRITE_SQL_ERRORS_TO_LOG, !_writeSQLErrorsToLog, _writeSQLErrorsToLog);
    Precondition Violations (1)
    Row Violation
    1Type net.sourceforge.squirrel_sql.client.gui.db.SQLAlias.IPropNames does not match with type net.sourceforge.squirrel_sql.client.session.properties.SessionProperties.IPropertyNames