File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/AliasesListInternalFrame.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/mainframe/MainFrameMenuBar.java | |||
Method name: JCheckBoxMenuItem addToMenuAsCheckBoxMenuItem(Resources, Action, JPopupMenu)
|
Method name: JCheckBoxMenuItem addToMenuAsCheckBoxMenuItem(Resources, Class, JMenu)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | JCheckBoxMenuItem mnu = rsrc.addToMenuAsCheckBoxMenuItem(action, menu);↵ | 1 | JCheckBoxMenuItem mnu = rsrc.addToMenuAsCheckBoxMenuItem(act, menu);↵ | |
2 | if(action instanceof IToggleAction)↵ | 2 | if(act instanceof IToggleAction)↵ | |
3 | {↵ | 3 | {↵ | |
4 | ((IToggleAction)action).getToggleComponentHolder().addToggleableComponent(mnu);↵ | 4 | ((IToggleAction)act).getToggleComponentHolder().addToggleableComponent(mnu);↵ | |
5 | }↵ | 5 | }↵ | |
6 | return mnu; | 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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 8 |
Number of mapped statements | 4 |
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) | 1.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | JCheckBoxMenuItem mnu = rsrc.addToMenuAsCheckBoxMenuItem(action, menu); |
| 3 | JCheckBoxMenuItem mnu = rsrc.addToMenuAsCheckBoxMenuItem(act, menu); | ||||||||||||||
2 | if (action instanceof IToggleAction) |
| 4 | if (act instanceof IToggleAction) | ||||||||||||||
3 | ((IToggleAction)action).getToggleComponentHolder().addToggleableComponent(mnu); |
| 5 | ((IToggleAction)act).getToggleComponentHolder().addToggleableComponent(mnu); | ||||||||||||||
4 | return mnu; | 6 | return mnu; |
Row | Violation |
---|---|
1 | Expression menu cannot be unified with expression menu , because common superclass type javax.swing.JComponent cannot be passed as an argument to public javax.swing.JCheckBoxMenuItem addToMenuAsCheckBoxMenuItem(javax.swing.Action, javax.swing.JPopupMenu) |
2 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.gui.db.AliasesListInternalFrame.UserInterfaceFactory and net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameMenuBar do not have a common superclass |