File path: /sql12/plugins/sqlval/src/net/sourceforge/squirrel_sql/plugins/sqlval/SQLValidatorPlugin.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/table/ContentsTab.java | |||
Method name: void sessionEnding(ISession)
|
Method name: boolean objectTreeTabIsSelected()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (wssp != null) {↵ | 1 | if (session != null) {↵ | |
2 | WebServiceSession wss = wssp.getWebServiceSession();↵ | 2 | SessionPanel sessionPanel = session.getSessionSheet();↵ | |
3 | if (wss != null) {↵ | 3 | if (sessionPanel != null) {↵ | |
4 | wss.close();↵ | 4 | result = sessionPanel.isObjectTreeTabSelected();↵ | |
5 | }↵ | 5 | ↵ | |
6 | ↵ | 6 | }↵ | |
7 | } | 7 |
| |
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 | 8 |
Number of mapped statements | 2 |
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) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (wssp != null) |
| 3 | if (session != null) | ||||||||||||||
|
| 4 | SessionPanel sessionPanel = session.getSessionSheet(); | |||||||||||||||
4 | WebServiceSession wss = wssp.getWebServiceSession(); |
| | |||||||||||||||
5 | if (wss != null) |
| 5 | if (sessionPanel != null) | ||||||||||||||
|
| 6 | result = sessionPanel.isObjectTreeTabSelected(); | |||||||||||||||
6 | wss.close(); |
| |
Row | Violation |
---|---|
1 | Type net.sourceforge.squirrel_sql.plugins.sqlval.WebServiceSessionProperties of variable wssp does not match with type net.sourceforge.squirrel_sql.client.session.ISession of variable session |
2 | Unmatched statement SessionPanel sessionPanel=session.getSessionSheet(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement WebServiceSession wss=wssp.getWebServiceSession(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Type net.sourceforge.squirrel_sql.plugins.sqlval.WebServiceSession of variable wss does not match with type net.sourceforge.squirrel_sql.client.gui.session.SessionPanel of variable sessionPanel |
5 | Unmatched statement result=sessionPanel.isObjectTreeTabSelected(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched statement wss.close(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.sqlval.SQLValidatorPlugin and net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.table.ContentsTab do not have a common superclass |