File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans/FindAction.java | File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans/ReplaceAction.java | |||
Method name: void doActionPerformed(ISQLEntryPanel, ActionEvent)
|
Method name: void doActionPerformed(ISQLEntryPanel, ActionEvent)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if(false == sqlEntryPanel instanceof NetbeansSQLEntryPanel)↵ | 1 | if(false == sqlEntryPanel instanceof NetbeansSQLEntryPanel)↵ | |
2 | {↵ | 2 | {↵ | |
3 | String msg =↵ | 3 | String msg =↵ | |
4 | //i18n[syntax.findNetbeansOnly=Find is only available when the Netbeans editor is used.\nSee menu File --> New Session Properties --> Tab Syntax]↵ | 4 | //i18n[syntax.replaceNetbeansOnly=Replace is only available when the Netbeans editor is used.\nSee menu File --> New Session Properties --> Tab Syntax]↵ | |
5 | s_stringMgr.getString("syntax.findNetbeansOnly");↵ | 5 | s_stringMgr.getString("syntax.replaceNetbeansOnly");↵ | |
6 | JOptionPane.showMessageDialog(_session.getApplication().getMainFrame(), msg);↵ | 6 | JOptionPane.showMessageDialog(_session.getApplication().getMainFrame(), msg);↵ | |
7 | return;↵ | 7 | return;↵ | |
8 | }↵ | 8 | }↵ | |
9 | NetbeansSQLEntryPanel nsep = (NetbeansSQLEntryPanel) sqlEntryPanel;↵ | 9 | NetbeansSQLEntryPanel nsep = (NetbeansSQLEntryPanel) sqlEntryPanel;↵ | |
10 | nsep.showFindDialog(evt); | 10 | nsep.showReplaceDialog(evt); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 20 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 16.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (false == sqlEntryPanel instanceof NetbeansSQLEntryPanel) | 1 | if (false == sqlEntryPanel instanceof NetbeansSQLEntryPanel) | |||||||||||||||
2 | String msg = s_stringMgr.getString("syntax.findNetbeansOnly"); |
| 2 | String msg = s_stringMgr.getString("syntax.replaceNetbeansOnly"); | ||||||||||||||
3 | JOptionPane.showMessageDialog(_session.getApplication().getMainFrame(), msg); | 3 | JOptionPane.showMessageDialog(_session.getApplication().getMainFrame(), msg); | |||||||||||||||
4 | return; | 4 | return; | |||||||||||||||
5 | NetbeansSQLEntryPanel nsep = (NetbeansSQLEntryPanel)sqlEntryPanel; | 5 | NetbeansSQLEntryPanel nsep = (NetbeansSQLEntryPanel)sqlEntryPanel; | |||||||||||||||
6 | nsep.showFindDialog(evt); |
| 6 | nsep.showReplaceDialog(evt); |
Row | Violation |
---|---|
1 | Expression nsep.showFindDialog(evt) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression nsep.showReplaceDialog(evt) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression nsep.showFindDialog(evt) is a void method call, and thus it cannot be parameterized |
4 | Expression nsep.showReplaceDialog(evt) is a void method call, and thus it cannot be parameterized |