GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { win.toFront(); win.setVisible(true); } });
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/WindowManager.java File path: /sql12/plugins/sqlscript/src/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/AbortController.java
Method name: void moveToFront(Window) 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
					win.toFront();
6
					win.setVisible(true);
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
    2
    GUIUtils.processOnSwingEventThread(new Runnable() {...});
    2
    GUIUtils.processOnSwingEventThread(new Runnable() {...});
    1
    GUIUtils.processOnSwingEventThread(new Runnable() {...});
    Differences
    Expression1Expression2Difference
    toFrontcenterWithinParentMETHOD_INVOCATION_NAME_MISMATCH
    java.awt.Windownet.sourceforge.squirrel_sql.fw.gui.GUIUtilsVARIABLE_TYPE_MISMATCH
    win.toFront()GUIUtils.centerWithinParent(_dlg)TYPE_COMPATIBLE_REPLACEMENT
    win.toFront()GUIUtils.centerWithinParent(_dlg)ARGUMENT_NUMBER_MISMATCH
    truebTYPE_COMPATIBLE_REPLACEMENT
    win_dlgVARIABLE_NAME_MISMATCH
    java.awt.Windowjavax.swing.JDialogSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression win.toFront() 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 java.awt.Window of variable win does not match with type net.sourceforge.squirrel_sql.fw.gui.GUIUtils of variable GUIUtils
    • Make classes java.awt.Window and net.sourceforge.squirrel_sql.fw.gui.GUIUtils extend a common superclass
    Expression win.toFront() 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
    1
    GUIUtils.processOnSwingEventThread(new Runnable() {...});
    Precondition Violations (5)
    Row Violation
    1Expression win.toFront() is a void method call, and thus it cannot be parameterized
    2Expression GUIUtils.centerWithinParent(_dlg) is a void method call, and thus it cannot be parameterized
    3Type java.awt.Window of variable win does not match with type net.sourceforge.squirrel_sql.fw.gui.GUIUtils of variable GUIUtils
    4Expression win.toFront() is a void method call, and thus it cannot be parameterized
    5Expression GUIUtils.centerWithinParent(_dlg) is a void method call, and thus it cannot be parameterized