File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans/SquirrelNBDialogFactory.java | File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/expander/OracleTableParentExpander.java | |||
Method name: Dialog createDialog(String, JPanel, boolean, JButton[], boolean, int, int, ActionListener)
|
Method name: List
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | if (actionListeners[j].equals(listener))↵ | 1 | if (↵ | |
2 | {↵ | |||
3 | // We don't add a listener to a button twice↵ | |||
4 | // because the FindDialogSupport class will call↵ | |||
5 | // this method with the same button instances↵ | |||
6 | // whenever the replace dialog is opened.↵ | |||
7 | //↵ | |||
8 | // If we add the listener again and again replace↵ | |||
9 | // will be done as often as the dialog is opened.↵ | |||
10 | // This is especially nasty if the text to replace↵ | |||
11 | // is part of the replacement text.↵ | |||
12 | found = true↵ | 2 | !childNode.getUserObject().toString().startsWith("BIN$")) {↵ | |
13 | ;↵ | 3 | result.add(childNode);↵ | |
14 | } | 4 | } | |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17 | if (actionListeners[j].equals(listener)) |
| 5 | if (!childNode.getUserObject().toString().startsWith("BIN$")) | ||||||||||
|
| 6 | result.add(childNode); | |||||||||||
18 | found = true; | |
Row | Violation |
---|---|
1 | Unmatched statement result.add(childNode); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |