File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/TimePanel.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/session/SessionPanel.java | |||
Method name: void removeNotify()
|
Method name: void removeNotify()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | super.removeNotify();↵ | 1 | super.removeNotify();↵ | |
2 | if (_timer != null)↵ | |||
3 | {↵ | |||
4 | _timer.stop();↵ | |||
5 | _timer = null;↵ | |||
6 | ↵ | 2 | if (_lis != null)↵ | |
3 | {↵ | |||
4 | getObjectTreePanel().removeObjectTreeListener(_lis);↵ | |||
5 | _lis = null;↵ | |||
7 | } | 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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
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) | 38.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | super.removeNotify(); |
| 1 | super.removeNotify(); | ||||||||||||||
2 | if (_timer != null) |
| 2 | if (_lis != null) | ||||||||||||||
|
| 3 | getObjectTreePanel().removeObjectTreeListener(_lis); | |||||||||||||||
3 | _timer.stop(); |
| | |||||||||||||||
|
| 4 | _lis = null; | |||||||||||||||
4 | _timer = null; |
| |
Row | Violation |
---|---|
1 | Super method call super.removeNotify(); cannot be extracted from method |
2 | Super method call super.removeNotify(); cannot be extracted from method |
3 | Type javax.swing.Timer of variable _timer does not match with type net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.IObjectTreeListener of variable _lis |
4 | Unmatched statement getObjectTreePanel().removeObjectTreeListener(_lis); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement _timer.stop(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched statement _lis=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched statement _timer=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
8 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.fw.gui.TimePanel and net.sourceforge.squirrel_sql.client.gui.session.SessionPanel.MyToolBar do not have a common superclass |