String msg =
//i18n[syntax.replaceNetbeansOnly=Replace is only available when the Netbeans editor is used.\nSee menu File --> New Session Properties --> Tab Syntax]
s_stringMgr.getString("syntax.replaceNetbeansOnly");
JOptionPane.showMessageDialog(_session.getApplication().getMainFrame(), msg);
return;
String msg =
s_stringMgr.getString("SQLResultExecuterPanel.nonStickyPanel");
JOptionPane.showMessageDialog(_session.getApplication().getMainFrame(),
msg);
return;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans/ReplaceAction.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/SQLResultExecuterPanel.java
|
Method name: void doActionPerformed(ISQLEntryPanel, ActionEvent)
|
|
Method name: void toggleCurrentSQLResultTabSticky()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | String msg =↵ | | 1 | String msg =↵
|
2 | //i18n[syntax.replaceNetbeansOnly=Replace is only available when the Netbeans editor is used.\nSee menu File --> New Session Properties --> Tab Syntax]↵ | | |
|
3 | s_stringMgr.getString("syntax.replaceNetbeansOnly↵ | | 2 | ↵
|
4 | ");↵ | | 3 | s_stringMgr.getString("SQLResultExecuterPanel.nonStickyPanel");↵
|
5 | JOptionPane.showMessageDialog(_session.getApplication().getMainFrame(), ↵ | | 4 | JOptionPane.showMessageDialog(_session.getApplication().getMainFrame(), ↵
|
6 | msg);↵ | | 5 | msg);↵
|
7 | return; | | 6 | return;
|
See real code fragment |
|
See real code fragment |
Summary
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | String msg = s_stringMgr.getString("syntax.replaceNetbeansOnly"); | | 11 | String msg = s_stringMgr.getString("SQLResultExecuterPanel.nonStickyPanel"); |
3 | JOptionPane.showMessageDialog(_session.getApplication().getMainFrame(), msg); | | 12 | JOptionPane.showMessageDialog(_session.getApplication().getMainFrame(), msg); |
4 | return; | | 13 | return; |
Precondition Violations (3)
Row |
Violation |
1 | Conditional return; |
2 | Conditional return; |
3 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.syntax.netbeans.ReplaceAction and net.sourceforge.squirrel_sql.client.session.mainpanel.SQLResultExecuterPanel do not have a common superclass |