frame.setSelected(true); if (frame instanceof ISmarttoolFrame) { ((ISmarttoolFrame)frame).setFocusToFirstEmptyInputField(); }
frame.setSelected(true); if (frame instanceof IFirebirdManagerFrame) { ((IFirebirdManagerFrame)frame).setFocusToFirstEmptyInputField(); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/smarttools/src/net/sourceforge/squirrel_sql/plugins/smarttools/SmarttoolsPlugin.java File path: /sql12/plugins/firebirdmanager/src/net/sourceforge/squirrel_sql/plugins/firebirdmanager/FirebirdManagerPlugin.java
Method name: void actionPerformed(ActionEvent) Method name: void actionPerformed(ActionEvent)
Number of AST nodes: 3 Number of AST nodes: 3
1
frame.setSelected(true);
1
frame.setSelected(true);
2
					if (frame instanceof ISmarttoolFrame) {
2
					if (frame instanceof IFirebirdManagerFrame) {
3
						((ISmarttoolFrame)frame).setFocusToFirstEmptyInputField();
3
						((IFirebirdManagerFrame)frame).setFocusToFirstEmptyInputField();
4
					}
4
					}
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.7
Clones locationClones are in different classes
Number of node comparisons6
  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)1.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    21
    frame.setSelected(true);
    23
    frame.setSelected(true);
    22
    if (frame instanceof ISmarttoolFrame)
    22
    if (frame instanceof ISmarttoolFrame)
    24
    if (frame instanceof IFirebirdManagerFrame)
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.smarttools.gui.ISmarttoolFramenet.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.IFirebirdManagerFrameVARIABLE_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.smarttools.gui.ISmarttoolFramenet.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.IFirebirdManagerFrameVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.plugins.smarttools.gui.ISmarttoolFrame does not match with type net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.IFirebirdManagerFrame
    • Make classes net.sourceforge.squirrel_sql.plugins.smarttools.gui.ISmarttoolFrame and net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.IFirebirdManagerFrame extend a common superclass
    Expression (ISmarttoolFrame)frame cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (IFirebirdManagerFrame)frame cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type net.sourceforge.squirrel_sql.plugins.smarttools.gui.ISmarttoolFrame does not match with type net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.IFirebirdManagerFrame
    • Make classes net.sourceforge.squirrel_sql.plugins.smarttools.gui.ISmarttoolFrame and net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.IFirebirdManagerFrame extend a common superclass
    24
    if (frame instanceof IFirebirdManagerFrame)
    23
    ((ISmarttoolFrame)frame).setFocusToFirstEmptyInputField();
    23
    ((ISmarttoolFrame)frame).setFocusToFirstEmptyInputField();
    25
    ((IFirebirdManagerFrame)frame).setFocusToFirstEmptyInputField();
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.smarttools.gui.ISmarttoolFramenet.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.IFirebirdManagerFrameVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression (ISmarttoolFrame)frame cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (IFirebirdManagerFrame)frame cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type net.sourceforge.squirrel_sql.plugins.smarttools.gui.ISmarttoolFrame does not match with type net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.IFirebirdManagerFrame
    • Make classes net.sourceforge.squirrel_sql.plugins.smarttools.gui.ISmarttoolFrame and net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.IFirebirdManagerFrame extend a common superclass
    25
    ((IFirebirdManagerFrame)frame).setFocusToFirstEmptyInputField();
    Precondition Violations (8)
    Row Violation
    1Type net.sourceforge.squirrel_sql.plugins.smarttools.gui.ISmarttoolFrame does not match with type net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.IFirebirdManagerFrame
    2Expression (ISmarttoolFrame)frame cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression (IFirebirdManagerFrame)frame cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Type net.sourceforge.squirrel_sql.plugins.smarttools.gui.ISmarttoolFrame does not match with type net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.IFirebirdManagerFrame
    5Expression (ISmarttoolFrame)frame cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression (IFirebirdManagerFrame)frame cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Type net.sourceforge.squirrel_sql.plugins.smarttools.gui.ISmarttoolFrame does not match with type net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.IFirebirdManagerFrame
    8The refactoring of the clones is infeasible, because classes and do not have a common superclass