File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans/NetbeansSQLEntryAreaFactory.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/TimePanel.java | |||
Method name: void sessionEnding(ISession)
|
Method name: Dimension getPreferredSize()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 3 | |||
1 | NetbeansSQLEntryPanel panel = _panels.get(id);↵ | 1 | Insets ins = border.getBorderInsets(this);↵ | |
2 | if (panel != null)↵ | 2 | if (ins != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | panel.sessionEnding();↵ | 4 | ↵ | |
5 | }↵ | |||
6 | _panels.remove(id); | 5 | _prefSize.width += (ins.left + ins.right);↵ | |
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 | 7 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | NetbeansSQLEntryPanel panel = _panels.get(id); | | ||||||||||||||||
| 12 | Insets ins = border.getBorderInsets(this); | ||||||||||||||||
5 | if (panel != null) |
| 13 | if (ins != null) | ||||||||||||||
6 | panel.sessionEnding(); |
| | |||||||||||||||
|
| 14 | _prefSize.width += (ins.left + ins.right); | |||||||||||||||
7 | _panels.remove(id); | |
Row | Violation |
---|---|
1 | Type net.sourceforge.squirrel_sql.plugins.syntax.netbeans.NetbeansSQLEntryPanel of variable panel does not match with type java.awt.Insets of variable ins |
2 | Unmatched statement panel.sessionEnding(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement _prefSize.width+=(ins.left + ins.right); 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 |