File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/ConnectToAliasCommand.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/DataSetScrollingPanel.java | |||
Method name: void execute()
|
Method name: void load(IDataSet, String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 6 | |||
1 | try↵ | 1 | try ↵ | |
2 | {↵ | 2 | { ↵ | |
3 | final SheetHandler hdl = new SheetHandler(_app, _sqlAlias, _createSession, _callback↵ | 3 | if (!_fullyCreated)↵ | |
4 | {↵ | |||
4 | );↵ | 5 | createUserInterface(destClassName, null); ↵ | |
5 | ↵ | 6 | ↵ | |
6 | if (SwingUtilities.isEventDispatchThread()) {↵ | |||
7 | createConnectionInternalFrame(hdl);↵ | |||
8 | } else {↵ | |||
9 | SwingUtilities.invokeLater(new Runnable() {↵ | |||
10 | public void run() {↵ | |||
11 | createConnectionInternalFrame(hdl);↵ | |||
12 | }↵ | |||
13 | });↵ | |||
14 | }↵ | 7 | _fullyCreated = true;↵ | |
8 | }↵ | |||
9 | Runnable run = new UIUpdater(_viewer, ds);↵ | |||
10 | SwingUtilities.invokeLater(run); ↵ | |||
15 | }↵ | 11 | } ↵ | |
16 | catch (Exception ex)↵ | 12 | catch (Exception ex) ↵ | |
17 | {↵ | 13 | { ↵ | |
18 | _app.showErrorDialog(ex);↵ | 14 | s_log.error("Error", ex); ↵ | |
19 | } | 15 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 7 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 102.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | try |
| 1 | try | ||||||||||||||||||||||||||||
| 2 | if (!_fullyCreated) | ||||||||||||||||||||||||||||||
|
| 3 | createUserInterface(destClassName, null); | |||||||||||||||||||||||||||||
|
| 4 | _fullyCreated = true; | |||||||||||||||||||||||||||||
2 | final SheetHandler hdl = new SheetHandler(_app, _sqlAlias, _createSession, _callback); |
| | |||||||||||||||||||||||||||||
3 | if (SwingUtilities.isEventDispatchThread()) | | ||||||||||||||||||||||||||||||
4 | createConnectionInternalFrame(hdl); | | ||||||||||||||||||||||||||||||
else | | |||||||||||||||||||||||||||||||
5 | SwingUtilities.invokeLater(new Runnable() {...}); | | ||||||||||||||||||||||||||||||
|
| 5 | Runnable run = new UIUpdater(_viewer, ds); | |||||||||||||||||||||||||||||
| 6 | SwingUtilities.invokeLater(run); |
Row | Violation |
---|---|
1 | Expression _app.showErrorDialog(ex) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression s_log.error("Error",ex) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression _app.showErrorDialog(ex) is a void method call, and thus it cannot be parameterized |
4 | Expression s_log.error("Error",ex) is a void method call, and thus it cannot be parameterized |
5 | Type net.sourceforge.squirrel_sql.client.IApplication of variable _app does not match with type net.sourceforge.squirrel_sql.fw.util.log.ILogger of variable s_log |
6 | Expression _app.showErrorDialog(ex) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression s_log.error("Error",ex) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression _app.showErrorDialog(ex) is a void method call, and thus it cannot be parameterized |
9 | Expression s_log.error("Error",ex) is a void method call, and thus it cannot be parameterized |
10 | Unmatched statement createUserInterface(destClassName,null); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
11 | Unmatched statement createUserInterface(destClassName,null); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
12 | Unmatched statement _fullyCreated=true; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
13 | Unmatched statement final SheetHandler hdl=new SheetHandler(_app,_sqlAlias,_createSession,_callback); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
14 | Unmatched statement final SheetHandler hdl=new SheetHandler(_app,_sqlAlias,_createSession,_callback); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
15 | Unmatched statement Runnable run=new UIUpdater(_viewer,ds); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
16 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand and net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetScrollingPanel do not have a common superclass |