File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/BaseObjectTab.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/properties/SessionSQLPropertiesPanel.java | |||
Method name: void setSession(ISession)
|
Method name: void initialize(IApplication, ISession)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (session == null)↵ | 1 | if (session == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | throw new IllegalArgumentException("Null ISession passed");↵ | 3 | throw new IllegalArgumentException("Null ISession passed");↵ | |
4 | }↵ | 4 | }↵ | |
5 | _app = session.getApplication();↵ | 5 | _props = session.get↵ | |
6 | _sessionId = session.getIdentifier(↵ | 6 | Properties();↵ | |
7 | ); | 7 | _myPanel.loadData(_props); | |
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 | 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) | 14.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
1 | if (session == null) | 1 | if (session == null) | ||||
2 | throw new IllegalArgumentException("Null ISession passed"); | 2 | throw new IllegalArgumentException("Null ISession passed"); | ||||
|
| 3 | _props = session.getProperties(); | ||||
3 | _app = session.getApplication(); |
| | ||||
|
| 4 | _myPanel.loadData(_props); | ||||
4 | _sessionId = session.getIdentifier(); |
| |
Row | Violation |
---|---|
1 | Unmatched statement _props=session.getProperties(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement _app=session.getApplication(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement _myPanel.loadData(_props); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement _sessionId=session.getIdentifier(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseObjectTab and net.sourceforge.squirrel_sql.client.session.properties.SessionSQLPropertiesPanel do not have a common superclass |