if(false == _whiteIconTimer.isRunning()) { _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)); }
if(null != _hibernateConnectionProvider.getHibernateConnection()) { _cc.show(); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/LogPanel.java File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/completion/HQLCompleteCodeAction.java
Method name: void mouseExited(MouseEvent) Method name: void actionPerformed(ActionEvent)
Number of AST nodes: 2 Number of AST nodes: 2
1
if(false == _whiteIconTimer.isRunning())
1
if(null != _hi
2
				{
3
					_btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM));
4
				
2
bernateConnectionProvider.getHibernateConnection())
3
      {
4
         _cc.show();
5
}
5
      }
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.2
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)351.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (false == _whiteIconTimer.isRunning())
    1
    if (false == _whiteIconTimer.isRunning())
    1
    if (null != _hibernateConnectionProvider.getHibernateConnection())
    Differences
    Expression1Expression2Difference
    falsenullAST_TYPE_MISMATCH
    isRunninggetHibernateConnectionMETHOD_INVOCATION_NAME_MISMATCH
    booleannet.sourceforge.squirrel_sql.plugins.hibernate.HibernateConnectionVARIABLE_TYPE_MISMATCH
    _whiteIconTimer_hibernateConnectionProviderVARIABLE_NAME_MISMATCH
    javax.swing.Timernet.sourceforge.squirrel_sql.plugins.hibernate.IHibernateConnectionProviderVARIABLE_TYPE_MISMATCH
    ==!=OPERATOR_MISMATCH
    Preondition Violations
    Type boolean of variable _whiteIconTimer.isRunning() does not match with type net.sourceforge.squirrel_sql.plugins.hibernate.HibernateConnection of variable _hibernateConnectionProvider.getHibernateConnection()
    Type javax.swing.Timer of variable _whiteIconTimer does not match with type net.sourceforge.squirrel_sql.plugins.hibernate.IHibernateConnectionProvider of variable _hibernateConnectionProvider
    • Make classes javax.swing.Timer and net.sourceforge.squirrel_sql.plugins.hibernate.IHibernateConnectionProvider extend a common superclass
    1
    if (null != _hibernateConnectionProvider.getHibernateConnection())
    2
    _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM));
    2
    _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM));
    2
    _cc.show();
    Differences
    Expression1Expression2Difference
    setIconshowMETHOD_INVOCATION_NAME_MISMATCH
    _btnLastLog_ccVARIABLE_NAME_MISMATCH
    javax.swing.JButtonnet.sourceforge.squirrel_sql.fw.completion.CompletorVARIABLE_TYPE_MISMATCH
    _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM))_cc.show()ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression _cc.show() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)) is a void method call, and thus it cannot be parameterized
    Expression _cc.show() is a void method call, and thus it cannot be parameterized
    Type javax.swing.JButton of variable _btnLastLog does not match with type net.sourceforge.squirrel_sql.fw.completion.Completor of variable _cc
    • Make classes javax.swing.JButton and net.sourceforge.squirrel_sql.fw.completion.Completor extend a common superclass
    Expression _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression _cc.show() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)) is a void method call, and thus it cannot be parameterized
    Expression _cc.show() is a void method call, and thus it cannot be parameterized
    2
    _cc.show();
    Precondition Violations (12)
    Row Violation
    1Type boolean of variable _whiteIconTimer.isRunning() does not match with type net.sourceforge.squirrel_sql.plugins.hibernate.HibernateConnection of variable _hibernateConnectionProvider.getHibernateConnection()
    2Type javax.swing.Timer of variable _whiteIconTimer does not match with type net.sourceforge.squirrel_sql.plugins.hibernate.IHibernateConnectionProvider of variable _hibernateConnectionProvider
    3Expression _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    4Expression _cc.show() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)) is a void method call, and thus it cannot be parameterized
    6Expression _cc.show() is a void method call, and thus it cannot be parameterized
    7Type javax.swing.JButton of variable _btnLastLog does not match with type net.sourceforge.squirrel_sql.fw.completion.Completor of variable _cc
    8Expression _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    9Expression _cc.show() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)) is a void method call, and thus it cannot be parameterized
    11Expression _cc.show() is a void method call, and thus it cannot be parameterized
    12The refactoring of the clones is infeasible, because classes and net.sourceforge.squirrel_sql.plugins.hibernate.completion.HQLCompleteCodeAction do not have a common superclass