File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfoCache.java | File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans/SquirrelNBDialogFactory.java | |||
Method name: boolean isCachedTableType(String)
|
Method name: Dialog createDialog(String, JPanel, boolean, JButton[], boolean, int, int, ActionListener)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 2 | |||
1 | if(_viewTableTypesCacheable[i].equals(type))↵ | 1 | if (actionListeners[j].equals(listener))↵ | |
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↵ | |||
2 | {↵ | 9 | ↵ | |
3 | ↵ | 10 | // will be done as often as the dialog is opened.↵ | |
11 | // This is especially nasty if the text to replace↵ | |||
12 | // is part of the replacement text.↵ | |||
4 | found = true;↵ | 13 | found = true;↵ | |
5 | break;↵ | 14 | ↵ | |
6 | } | 15 |
| |
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 | 8 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (_viewTableTypesCacheable[i].equals(type)) |
| 17 | if (actionListeners[j].equals(listener)) | ||||||||||||||||||||||||
4 | found = true; | 18 | found = true; | |||||||||||||||||||||||||
5 | break; |
| |
Row | Violation |
---|---|
1 | Type java.lang.String of variable type does not match with type java.awt.event.ActionListener of variable listener |
2 | Type java.lang.String[] of variable _viewTableTypesCacheable does not match with type java.awt.event.ActionListener[] of variable actionListeners |
3 | Unmatched break; |
4 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.session.schemainfo.SchemaInfoCache and net.sourceforge.squirrel_sql.plugins.syntax.netbeans.SquirrelNBDialogFactory do not have a common superclass |