GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { _refreshBtn.setEnabled(enabled); _logDirCmb.setEnabled(enabled); } });
GUIUtils.processOnSwingEventThread ( new Runnable() { public void run() { GUIUtils.centerWithinParent(_dlg); _dlg.setVisible(b); } });
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/ViewLogsSheet.java File path: /sql12/plugins/sqlscript/src/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/AbortController.java
Method name: void enableComponents(boolean) Method name: void setVisible(boolean)
Number of AST nodes: 1 Number of AST nodes: 1
1
GUIUtils.processOnSwingEventThread(new Runnable()
1
GUIUtils.processOnSwingEventThread
2
		{
3
			public void run()
4
			{
5
				_refreshBtn.setEnabled(enabled);
6
				_logDirCmb.setEnabled(enabled);
7
			}
8
		
2
         (
3
            new Runnable()
4
            {
5
               public void run()
6
               {
7
                  GUIUtils.centerWithinParent(_dlg);
8
                  _dlg.setVisible(b);
9
               }
9
});
10
            });
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.0
Clones locationClones are in different classes
Number of node comparisons1
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    GUIUtils.processOnSwingEventThread(new Runnable() {...});
    1
    GUIUtils.processOnSwingEventThread(new Runnable() {...});
    1
    GUIUtils.processOnSwingEventThread(new Runnable() {...});
    Differences
    Expression1Expression2Difference
    enabled_dlgVARIABLE_NAME_MISMATCH
    booleanjavax.swing.JDialogVARIABLE_TYPE_MISMATCH
    setEnabledcenterWithinParentMETHOD_INVOCATION_NAME_MISMATCH
    javax.swing.JButtonnet.sourceforge.squirrel_sql.fw.gui.GUIUtilsVARIABLE_TYPE_MISMATCH
    _refreshBtn.setEnabled(enabled)GUIUtils.centerWithinParent(_dlg)TYPE_COMPATIBLE_REPLACEMENT
    enabledbVARIABLE_NAME_MISMATCH
    setEnabledsetVisibleMETHOD_INVOCATION_NAME_MISMATCH
    _logDirCmb_dlgVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.gui.ViewLogsSheet.LogsComboBoxjavax.swing.JDialogSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Type boolean of variable enabled does not match with type javax.swing.JDialog of variable _dlg
    Expression _refreshBtn.setEnabled(enabled) is a void method call, and thus it cannot be parameterized
    Expression GUIUtils.centerWithinParent(_dlg) is a void method call, and thus it cannot be parameterized
    Type javax.swing.JButton of variable _refreshBtn does not match with type net.sourceforge.squirrel_sql.fw.gui.GUIUtils of variable GUIUtils
    • Make classes javax.swing.JButton and net.sourceforge.squirrel_sql.fw.gui.GUIUtils extend a common superclass
    Expression _refreshBtn.setEnabled(enabled) is a void method call, and thus it cannot be parameterized
    Expression GUIUtils.centerWithinParent(_dlg) is a void method call, and thus it cannot be parameterized
    Expression _logDirCmb.setEnabled(enabled) is a void method call, and thus it cannot be parameterized
    Expression _dlg.setVisible(b) is a void method call, and thus it cannot be parameterized
    1
    GUIUtils.processOnSwingEventThread(new Runnable() {...});
    Precondition Violations (8)
    Row Violation
    1Type boolean of variable enabled does not match with type javax.swing.JDialog of variable _dlg
    2Expression _refreshBtn.setEnabled(enabled) is a void method call, and thus it cannot be parameterized
    3Expression GUIUtils.centerWithinParent(_dlg) is a void method call, and thus it cannot be parameterized
    4Type javax.swing.JButton of variable _refreshBtn does not match with type net.sourceforge.squirrel_sql.fw.gui.GUIUtils of variable GUIUtils
    5Expression _refreshBtn.setEnabled(enabled) is a void method call, and thus it cannot be parameterized
    6Expression GUIUtils.centerWithinParent(_dlg) is a void method call, and thus it cannot be parameterized
    7Expression _logDirCmb.setEnabled(enabled) is a void method call, and thus it cannot be parameterized
    8Expression _dlg.setVisible(b) is a void method call, and thus it cannot be parameterized