File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/table/ContentsTab.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/ToggleTreeViewAction.java | |||
Method name: boolean objectTreeTabIsSelected()
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 3 | |||
1 | if (session != null) {↵ | |||
2 | SessionPanel sessionPanel = session.getSessionSheet();↵ | |||
3 | if (sessionPanel != null) {↵ | |||
4 | result = sessionPanel.isObjectTreeTabSe↵ | 1 | AliasesListInternalFrame aliasesListInternalFrame = windowManager.getAliasesListInternalFrame();↵ | |
2 | if (aliasesListInternalFrame != null)↵ | |||
3 | {↵ | |||
5 | lected();↵ | 4 | aliasesListInternalFrame.enableDisableAct↵ | |
6 | }↵ | |||
7 | ↵ | 5 | ions();↵ | |
8 | } | 6 | } | |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | SessionPanel sessionPanel = session.getSessionSheet(); | | ||||||||||||||||
| 6 | AliasesListInternalFrame aliasesListInternalFrame = windowManager.getAliasesListInternalFrame(); | ||||||||||||||||
5 | if (sessionPanel != null) |
| 7 | if (aliasesListInternalFrame != null) | ||||||||||||||
6 | result = sessionPanel.isObjectTreeTabSelected(); |
| | |||||||||||||||
|
| 8 | aliasesListInternalFrame.enableDisableActions(); |
Row | Violation |
---|---|
1 | Type net.sourceforge.squirrel_sql.client.gui.session.SessionPanel of variable sessionPanel does not match with type net.sourceforge.squirrel_sql.client.gui.db.AliasesListInternalFrame of variable aliasesListInternalFrame |
2 | Unmatched statement result=sessionPanel.isObjectTreeTabSelected(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement aliasesListInternalFrame.enableDisableActions(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |