if(false == _whiteIconTimer.isRunning()) { _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)); }
if(null != e.getNewLeadSelectionPath()) { scrollPathToVisible(e.getNewLeadSelectionPath()); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/LogPanel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/ObjectTree.java
Method name: void mouseExited(MouseEvent) Method name: void valueChanged(TreeSelectionEvent)
Number of AST nodes: 2 Number of AST nodes: 2
1
if(false == _whiteIconTimer.isRunning())
1
if(
2
				{
3
					_btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM));
4
				
2
null != e.getNewLeadSelectionPath())
3
            {
4
               scrollPathToVisible(e.getNewLeadSelectionPath());
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.6
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)16.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (false == _whiteIconTimer.isRunning())
    1
    if (false == _whiteIconTimer.isRunning())
    1
    if (null != e.getNewLeadSelectionPath())
    Differences
    Expression1Expression2Difference
    falsenullAST_TYPE_MISMATCH
    isRunninggetNewLeadSelectionPathMETHOD_INVOCATION_NAME_MISMATCH
    booleanjavax.swing.tree.TreePathVARIABLE_TYPE_MISMATCH
    _whiteIconTimereVARIABLE_NAME_MISMATCH
    javax.swing.Timerjavax.swing.event.TreeSelectionEventVARIABLE_TYPE_MISMATCH
    ==!=OPERATOR_MISMATCH
    getIcongetNewLeadSelectionPathMETHOD_INVOCATION_NAME_MISMATCH
    javax.swing.ImageIconjavax.swing.tree.TreePathVARIABLE_TYPE_MISMATCH
    _resourceseVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.resources.SquirrelResourcesjavax.swing.event.TreeSelectionEventVARIABLE_TYPE_MISMATCH
    _resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)e.getNewLeadSelectionPath()ARGUMENT_NUMBER_MISMATCH
    setIconscrollPathToVisibleMETHOD_INVOCATION_NAME_MISMATCH
    _btnLastLogMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Type boolean of variable _whiteIconTimer.isRunning() does not match with type javax.swing.tree.TreePath of variable e.getNewLeadSelectionPath()
    Type javax.swing.Timer of variable _whiteIconTimer does not match with type javax.swing.event.TreeSelectionEvent of variable e
    • Make classes javax.swing.Timer and javax.swing.event.TreeSelectionEvent extend a common superclass
    Expression _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 e.getNewLeadSelectionPath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type javax.swing.ImageIcon of variable _resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM) does not match with type javax.swing.tree.TreePath of variable e.getNewLeadSelectionPath()
    • Make classes javax.swing.ImageIcon and javax.swing.tree.TreePath extend a common superclass
    Type net.sourceforge.squirrel_sql.client.resources.SquirrelResources of variable _resources does not match with type javax.swing.event.TreeSelectionEvent of variable e
    • Make classes net.sourceforge.squirrel_sql.client.resources.SquirrelResources and javax.swing.event.TreeSelectionEvent extend a common superclass
    Expression _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 e.getNewLeadSelectionPath() 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 method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression scrollPathToVisible(e.getNewLeadSelectionPath()) 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 scrollPathToVisible(e.getNewLeadSelectionPath()) is a void method call, and thus it cannot be parameterized
    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 scrollPathToVisible(e.getNewLeadSelectionPath()) 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 scrollPathToVisible(e.getNewLeadSelectionPath()) is a void method call, and thus it cannot be parameterized
    1
    if (null != e.getNewLeadSelectionPath())
    2
    _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM));
    2
    _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM));
    2
    scrollPathToVisible(e.getNewLeadSelectionPath());
    Differences
    Expression1Expression2Difference
    getIcongetNewLeadSelectionPathMETHOD_INVOCATION_NAME_MISMATCH
    javax.swing.ImageIconjavax.swing.tree.TreePathVARIABLE_TYPE_MISMATCH
    _resourceseVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.resources.SquirrelResourcesjavax.swing.event.TreeSelectionEventVARIABLE_TYPE_MISMATCH
    _resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)e.getNewLeadSelectionPath()ARGUMENT_NUMBER_MISMATCH
    setIconscrollPathToVisibleMETHOD_INVOCATION_NAME_MISMATCH
    _btnLastLogMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression _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 e.getNewLeadSelectionPath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type javax.swing.ImageIcon of variable _resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM) does not match with type javax.swing.tree.TreePath of variable e.getNewLeadSelectionPath()
    • Make classes javax.swing.ImageIcon and javax.swing.tree.TreePath extend a common superclass
    Type net.sourceforge.squirrel_sql.client.resources.SquirrelResources of variable _resources does not match with type javax.swing.event.TreeSelectionEvent of variable e
    • Make classes net.sourceforge.squirrel_sql.client.resources.SquirrelResources and javax.swing.event.TreeSelectionEvent extend a common superclass
    Expression _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 e.getNewLeadSelectionPath() 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 method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression scrollPathToVisible(e.getNewLeadSelectionPath()) 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 scrollPathToVisible(e.getNewLeadSelectionPath()) is a void method call, and thus it cannot be parameterized
    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 scrollPathToVisible(e.getNewLeadSelectionPath()) 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 scrollPathToVisible(e.getNewLeadSelectionPath()) is a void method call, and thus it cannot be parameterized
    2
    scrollPathToVisible(e.getNewLeadSelectionPath());
    Precondition Violations (31)
    Row Violation
    1Type boolean of variable _whiteIconTimer.isRunning() does not match with type javax.swing.tree.TreePath of variable e.getNewLeadSelectionPath()
    2Type javax.swing.Timer of variable _whiteIconTimer does not match with type javax.swing.event.TreeSelectionEvent of variable e
    3Expression _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 e.getNewLeadSelectionPath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Type javax.swing.ImageIcon of variable _resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM) does not match with type javax.swing.tree.TreePath of variable e.getNewLeadSelectionPath()
    6Type net.sourceforge.squirrel_sql.client.resources.SquirrelResources of variable _resources does not match with type javax.swing.event.TreeSelectionEvent of variable e
    7Expression _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
    8Expression e.getNewLeadSelectionPath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression _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
    10Expression scrollPathToVisible(e.getNewLeadSelectionPath()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)) is a void method call, and thus it cannot be parameterized
    12Expression scrollPathToVisible(e.getNewLeadSelectionPath()) is a void method call, and thus it cannot be parameterized
    13Expression _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
    14Expression scrollPathToVisible(e.getNewLeadSelectionPath()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)) is a void method call, and thus it cannot be parameterized
    16Expression scrollPathToVisible(e.getNewLeadSelectionPath()) is a void method call, and thus it cannot be parameterized
    17Expression _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
    18Expression e.getNewLeadSelectionPath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Type javax.swing.ImageIcon of variable _resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM) does not match with type javax.swing.tree.TreePath of variable e.getNewLeadSelectionPath()
    20Type net.sourceforge.squirrel_sql.client.resources.SquirrelResources of variable _resources does not match with type javax.swing.event.TreeSelectionEvent of variable e
    21Expression _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
    22Expression e.getNewLeadSelectionPath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    23Expression _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
    24Expression scrollPathToVisible(e.getNewLeadSelectionPath()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25Expression _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)) is a void method call, and thus it cannot be parameterized
    26Expression scrollPathToVisible(e.getNewLeadSelectionPath()) is a void method call, and thus it cannot be parameterized
    27Expression _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
    28Expression scrollPathToVisible(e.getNewLeadSelectionPath()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    29Expression _btnLastLog.setIcon(_resources.getIcon(SquirrelResources.IImageNames.WHITE_GEM)) is a void method call, and thus it cannot be parameterized
    30Expression scrollPathToVisible(e.getNewLeadSelectionPath()) is a void method call, and thus it cannot be parameterized
    31The refactoring of the clones is infeasible, because classes and do not have a common superclass