File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/action/ActionCollection.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/action/ActionCollection.java | |||
Method name: void activationChanged(IWidget)
|
Method name: void activationChanged(IWidget)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | SessionInternalFrame sif = (SessionInternalFrame) frame;↵ | 1 | SessionInternalFrame sif = (SessionInternalFrame) frame;↵ | |
2 | if(sif.getSessionPanel().isSQLTabSelected())↵ | 2 | if(sif.getSessionPanel().isObjectTreeTabSelected())↵ | |
3 | {↵ | 3 | {↵ | |
4 | ((ISQLPanelAction)act).setSQLPanel(sif.getSessionPanel().getSQLPaneAPI());↵ | 4 | ((IObjectTreeAction)act).setObjectTree(((SessionInternalFrame)frame).getSessionPanel().getObjectTreePanel());↵ | |
5 | }↵ | 5 | }↵ | |
6 | else↵ | 6 | else↵ | |
7 | {↵ | 7 | {↵ | |
8 | ((ISQLPanelAction)act).setSQLPanel(null);↵ | 8 | ((IObjectTreeAction)act).setObjectTree(null);↵ | |
9 | } | 9 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 12 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 18.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16 | SessionInternalFrame sif = (SessionInternalFrame)frame; | 21 | SessionInternalFrame sif = (SessionInternalFrame)frame; | |||||||||||||||||
17 | if (sif.getSessionPanel().isSQLTabSelected()) |
| 22 | if (sif.getSessionPanel().isObjectTreeTabSelected()) | ||||||||||||||||
18 | ((ISQLPanelAction)act).setSQLPanel(sif.getSessionPanel().getSQLPaneAPI()); |
| | |||||||||||||||||
| 23 | ((IObjectTreeAction)act).setObjectTree(((SessionInternalFrame)frame).getSessionPanel().getObjectTreePanel()); | ||||||||||||||||||
else | else | |||||||||||||||||||
19 | ((ISQLPanelAction)act).setSQLPanel(null); |
| 24 | ((IObjectTreeAction)act).setObjectTree(null); |
Row | Violation |
---|---|
1 | Expression sif.getSessionPanel().isSQLTabSelected() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression sif.getSessionPanel().isObjectTreeTabSelected() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement ((ISQLPanelAction)act).setSQLPanel(sif.getSessionPanel().getSQLPaneAPI()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Expression ((ISQLPanelAction)act).setSQLPanel(null) is a void method call, and thus it cannot be parameterized |
5 | Expression ((IObjectTreeAction)act).setObjectTree(null) is a void method call, and thus it cannot be parameterized |
6 | Type net.sourceforge.squirrel_sql.client.session.action.ISQLPanelAction does not match with type net.sourceforge.squirrel_sql.client.session.action.IObjectTreeAction |