if (e.isPopupTrigger())
{
int tab = _tabbedExecutionsPanel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY());
if (-1 != tab)
{
popup.show(e.getComponent(), e.getX(), e.getY());
}
}
if (e.isPopupTrigger())
{
int tab = _tabbedPane.getUI().tabForCoordinate(_tabbedPane, e.getX(), e.getY());
if (-1 != tab)
{
_tabRightMouseMenu.show(e.getComponent(), e.getX(), e.getY());
}
}
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/SQLResultExecuterPanel.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/desktopcontainer/docktabdesktop/DockTabDesktopPane.java
|
Method name: void maybeShowPopup(MouseEvent, JPopupMenu)
|
|
Method name: void maybeShowTabRightMouseMenu(MouseEvent)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (e.isPopupTrigger())↵ | | 1 | if (e.isPopupTrigger())↵
|
2 | {↵ | | 2 | {↵
|
3 | int tab = _tabbedExecutionsPanel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY());↵ | | 3 | int tab = _tabbedPane.getUI().tabForCoordinate(_tabbedPane, e.getX(), e.getY());↵
|
4 | if (-1 != tab)↵ | | 4 | if (-1 != tab)↵
|
5 | {↵ | | 5 | {↵
|
6 | popup.show(e.getComponent(), e.getX(), e.getY());↵ | | 6 | _tabRightMouseMenu.show(e.getComponent(), e.getX(), e.getY());↵
|
7 | }↵ | | 7 | }↵
|
8 | } | | 8 | }
|
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 8 |
-
{Non-refactorable}
Mapping Summary
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) | 9.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (e.isPopupTrigger()) | | 1 | if (e.isPopupTrigger()) |
2 | int tab = _tabbedExecutionsPanel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY()); | | 2 | int tab = _tabbedPane.getUI().tabForCoordinate(_tabbedPane, e.getX(), e.getY()); |
3 | | | 3 | |
4 | popup.show(e.getComponent(), e.getX(), e.getY()); | | 4 | _tabRightMouseMenu.show(e.getComponent(), e.getX(), e.getY()); |
Precondition Violations (1)
Row |
Violation |
1 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.session.mainpanel.SQLResultExecuterPanel and net.sourceforge.squirrel_sql.client.gui.desktopcontainer.docktabdesktop.DockTabDesktopPane do not have a common superclass |