if (SwingUtilities.isEventDispatchThread()) { _getDialog(owner, title, modal, listener); } else { try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { _getDialog(owner, title, modal, listener); } }); } catch (Exception e) { //i18n[DualProgressBarDialog.error.getdialog=getDialog: unable to invokeAndWait for dialog] log.error(s_stringMgr.getString("DualProgressBarDialog.error.getdialog"), e); } } return dialog;
if (SwingUtilities.isEventDispatchThread()) { _getDialog(owner, title, modal, listener); } else { try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { _getDialog(owner, title, modal, listener); } }); } catch (Exception e) { //i18n[ProgressBarDialog.error.getdialog=getDialog: unable to invokeAndWait for dialog] log.error(stringMgr.getString("ProgressBarDialog.error.getdialog"), e); } } return dialog;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/gui/DualProgressBarDialog.java File path: /sql12/plugins/dataimport/src/net/sourceforge/squirrel_sql/plugins/dataimport/gui/ProgressBarDialog.java
Method name: JDialog getDialog(Frame, String, boolean, ActionListener) Method name: JDialog getDialog(Frame, String, boolean, ActionListener)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (SwingUtilities.isEventDispatchThread()) {
1
if (SwingUtilities.isEventDispatchThread()) {
2
            _getDialog(owner, title, modal, listener);
2
            _getDialog(owner, title, modal, listener);
3
        } else {
3
        } else {
4
            try {
4
            try {
5
                SwingUtilities.invokeAndWait(new Runnable() {
5
                SwingUtilities.invokeAndWait(new Runnable() {
6
                    public void run() {
6
                    public void run() {
7
                        _getDialog(owner, title, modal, listener);
7
                        _getDialog(owner, title, modal, listener);
8
                    }
8
                    }
9
                });
9
                });
10
            } catch (Exception e) {
10
            } catch (Exception e) {
11
                //i18n[DualProgressBarDialog.error.getdialog=getDialog: unable to invokeAndWait for dialog]
11
                //i18n[ProgressBarDialog.error.getdialog=getDialog: unable to invokeAndWait for dialog]
12
                log.error(s_stringMgr.getString("DualProgressBarDialog.error.getdialog"), e);
12
                log.error(stringMgr.getString("ProgressBarDialog.error.getdialog"), e);
13
            }
13
            }
14
        }
14
        }
15
        
15
        
16
        return dialog;
16
        return dialog;
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.5
Clones locationClones are in different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (SwingUtilities.isEventDispatchThread())
    1
    if (SwingUtilities.isEventDispatchThread())
    2
    _getDialog(owner, title, modal, listener);
    2
    _getDialog(owner, title, modal, listener);
    3
    try
    3
    try
    3
    try
    Differences
    Expression1Expression2Difference
    "DualProgressBarDialog.error.getdialog""ProgressBarDialog.error.getdialog"LITERAL_VALUE_MISMATCH
    s_stringMgrstringMgrVARIABLE_NAME_MISMATCH
    3
    try
    4
    SwingUtilities.invokeAndWait(new Runnable() {...});
    4
    SwingUtilities.invokeAndWait(new Runnable() {...});
    5
    return dialog;
    5
    return dialog;
    Precondition Violations (0)
    Row Violation