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);
}
}
try {
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
String tmp =
(String)JOptionPane.showInputDialog(parent,
message,
title,
messageType,
icon,
null,
initialValue);
result.append(tmp);
}
});
} catch (Exception e) {
log.error(
"showTextInputDialog: encountered unexpected exception ",
e);
}
Clone fragments detected by clone detection tool
File path: /sql12/plugins/dataimport/src/net/sourceforge/squirrel_sql/plugins/dataimport/gui/ProgressBarDialog.java
|
|
File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/CopyProgressMonitor.java
|
Method name: JDialog getDialog(Frame, String, boolean, ActionListener)
|
|
Method name: String showTextInputDialog(Object, String, int, Icon, Object)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 2
|
|
1 | if (SwingUtilities.isEventDispatchThread()) {↵ | | |
|
2 | _getDialog(owner, title, modal, listener);↵ | | |
|
3 | } else {↵ | | |
|
4 | try {↵ | | |
|
5 | SwingUtilities.invokeAndWait(new Runnable() {↵ | | |
|
6 | public void run() {↵ | | |
|
7 | _getDialog(owner, title, modal, listener↵ | | 1 | try {↵
|
| | | 2 | SwingUtilities.invokeAndWait(new Runnable() {↵
|
| | | 3 | public void run() {↵
|
| | | 4 | String tmp = ↵
|
| | | 5 | (String)JOptionPane.showInputDialog(parent, ↵
|
| | | 6 | message, ↵
|
| | | 7 | title, ↵
|
| | | 8 | messageType, ↵
|
| | | 9 | icon, ↵
|
| | | 10 | null, ↵
|
| | | 11 | initialValue);↵
|
8 | );↵ | | 12 | result.append(tmp);↵
|
9 | }↵ | | 13 | }↵
|
10 | });↵ | | 14 | });↵
|
11 | } catch (Exception e) {↵ | | 15 | } catch (Exception e) {↵
|
12 | //i18n[ProgressBarDialog.error.getdialog=getDialog: unable to invokeAndWait for dialog]↵ | | 16 | ↵
|
13 | log.error(stringMgr.getString("ProgressBarDialog.error.getdialog"), e);↵ | | |
|
| | | 17 | log.error(↵
|
| | | 18 | "showTextInputDialog: encountered unexpected exception ",↵
|
14 | }↵ | | 19 | ↵
|
| | | 20 | e);↵
|
15 | } | | 21 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |