if (_connectAtStartup != value) { _connectAtStartup = value; getPropertyChangeReporter().firePropertyChange(IPropNames.CONNECT_AT_STARTUP, !_connectAtStartup, _connectAtStartup); }
if (_usePlainTextControl != data) { getPropertyChangeReporter().firePropertyChange(IPropertyNames.USE_PLAIN_CONTROL, _usePlainTextControl, data); _usePlainTextControl = data; }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/SQLAlias.java File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/SyntaxPreferences.java
Method name: void setConnectAtStartup(boolean) Method name: void setUsePlainTextControl(boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (_connectAtStartup != value)
1
if (_
2
      {
3
         _connectAtStartup = value;
2
usePlainTextControl != data)
3
      {
4
         getPropertyChangeReporter().firePropertyChange(IPropNames.CONNECT_AT_STARTUP,
4
         getPropertyChangeReporter().firePropertyChange(IPropertyNames.
5
                                    !_connectAtStartup, _connectAtStartup)
5
USE_PLAIN_CONTROL, _usePlainTextControl, data);
6
;
6
         _usePlainTextControl = data;
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 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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (_connectAtStartup != value)
    1
    if (_connectAtStartup != value)
    1
    if (_usePlainTextControl != data)
    Differences
    Expression1Expression2Difference
    _connectAtStartup_usePlainTextControlVARIABLE_NAME_MISMATCH
    valuedataVARIABLE_NAME_MISMATCH
    1
    if (_usePlainTextControl != data)
    2
    _connectAtStartup = value;
    2
    _connectAtStartup = value;
    3
    _usePlainTextControl = data;
    Differences
    Expression1Expression2Difference
    _connectAtStartup_usePlainTextControlVARIABLE_NAME_MISMATCH
    valuedataVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression _connectAtStartup is a field being modified, and thus it cannot be parameterized
    Expression _usePlainTextControl is a field being modified, and thus it cannot be parameterized
    3
    _usePlainTextControl = data;
    3
    getPropertyChangeReporter().firePropertyChange(IPropNames.CONNECT_AT_STARTUP, !_connectAtStartup, _connectAtStartup);
    3
    getPropertyChangeReporter().firePropertyChange(IPropNames.CONNECT_AT_STARTUP, !_connectAtStartup, _connectAtStartup);
    2
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.USE_PLAIN_CONTROL, _usePlainTextControl, data);
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.gui.db.SQLAlias.IPropNamesnet.sourceforge.squirrel_sql.plugins.syntax.SyntaxPreferences.IPropertyNamesVARIABLE_TYPE_MISMATCH
    CONNECT_AT_STARTUPUSE_PLAIN_CONTROLVARIABLE_NAME_MISMATCH
    !_connectAtStartup_usePlainTextControlTYPE_COMPATIBLE_REPLACEMENT
    _connectAtStartupdataVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.gui.db.SQLAlias.IPropNames does not match with type net.sourceforge.squirrel_sql.plugins.syntax.SyntaxPreferences.IPropertyNames
    • Make classes net.sourceforge.squirrel_sql.client.gui.db.SQLAlias.IPropNames and net.sourceforge.squirrel_sql.plugins.syntax.SyntaxPreferences.IPropertyNames extend a common superclass
    Expression !_connectAtStartup cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression _connectAtStartup cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.USE_PLAIN_CONTROL, _usePlainTextControl, data);
    Precondition Violations (5)
    Row Violation
    1Expression _connectAtStartup is a field being modified, and thus it cannot be parameterized
    2Expression _usePlainTextControl is a field being modified, and thus it cannot be parameterized
    3Type net.sourceforge.squirrel_sql.client.gui.db.SQLAlias.IPropNames does not match with type net.sourceforge.squirrel_sql.plugins.syntax.SyntaxPreferences.IPropertyNames
    4Expression !_connectAtStartup cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression _connectAtStartup cannot be parameterized, because it has dependencies to/from statements that will be extracted