try
{
final SheetHandler hdl = new SheetHandler(_app, _sqlAlias, _createSession, _callback);
if (SwingUtilities.isEventDispatchThread()) {
createConnectionInternalFrame(hdl);
} else {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
createConnectionInternalFrame(hdl);
}
});
}
}
catch (Exception ex)
{
_app.showErrorDialog(ex);
}
if (_session != null)
{
try
{
new FormatSQLCommand(_session, _plugin).execute();
}
catch (Throwable ex)
{
// i18n[editextras.errorProcessingFormat=Error processing Format SQL command: {0}]
final String msg = s_stringMgr.getString("editextras.errorProcessingFormat", ex);
_session.showErrorMessage(msg);
s_log.error(msg, ex);
}
}
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/ConnectToAliasCommand.java
|
|
File path: /sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/FormatSQLAction.java
|
Method name: void execute()
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 3
|
|
| | | 1 | if (_session != null)↵
|
| | | 2 | {↵
|
1 | try↵ | | 3 | try↵
|
2 | {↵ | | 4 | {↵
|
3 | final SheetHandler hdl = new SheetHandler(_app, _sqlAlias, _createSession, _callback);↵ | | 5 | ↵
|
4 | ↵ | | |
|
5 | if (SwingUtilities.isEventDisp↵ | | 6 | new FormatSQLCommand(_session, _plugin).execute();↵
|
| | | 7 | }↵
|
6 | atchThread()) {↵ | | 8 | catch (Thr↵
|
7 | createConnectionInternalFrame(hdl);↵ | | |
|
8 | } else {↵ | | |
|
9 | SwingUtiliti↵ | | 9 | owable ex)↵
|
| | | 10 | {↵
|
10 | es.invokeLater(new Runnable() {↵ | | 11 | // i18n[editextras.errorProcessingFormat=Error processin↵
|
11 | public void run() {↵ | | |
|
12 | createConnectionInternalFrame(hdl);↵ | | |
|
13 | }↵ | | |
|
14 | });↵ | | |
|
15 | }↵ | | |
|
16 | }↵ | | |
|
17 | catch (Exception↵ | | 12 | g Format SQL command: {0}]↵
|
18 | ex)↵ | | 13 | final String msg = s_stringMgr.getString("editextras.errorProcessingFormat", ex);↵
|
19 | {↵ | | 14 | ↵
|
20 | _app.showErrorDialog(ex);↵ | | 15 | _session.showErrorMessage(msg);↵
|
| | | 16 | s_log.error(msg, ex);↵
|
| | | 17 | }↵
|
21 | } | | 18 | }
|
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 2 |