if (e.isPopupTrigger())
{
int index =
_tabbedExecutionsPanel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY());
if (-1 != index)
{
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/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/explain/ExplainExecuterPanel.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/desktopcontainer/docktabdesktop/DockTabDesktopPane.java
|
Method name: void showPopup(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 | {↵ | | |
|
3 | int index =↵ | | |
|
4 | _tabbedExecutions↵ | | |
|
| | | 2 | {↵
|
5 | Panel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY());↵ | | 3 | int tab = _tabbedPane.getUI().tabForCoordinate(_tabbedPane, e.getX(), e.getY());↵
|
6 | if (-1 != index)↵ | | |
|
7 | {↵ | | |
|
8 | popup↵ | | |
|
| | | 4 | if (-1 != tab)↵
|
| | | 5 | {↵
|
9 | .show(e.getComponent(), e.getX(), e.getY());↵ | | 6 | _tabRightMouseMenu.show(e.getComponent(), e.getX(), e.getY());↵
|
10 | }↵ | | |
|
11 | ↵ | | |
|
| | | 7 | }↵
|
12 | } | | 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) | 3.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (e.isPopupTrigger()) | | 1 | if (e.isPopupTrigger()) |
2 | int index = _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.plugins.postgres.explain.ExplainExecuterPanel and net.sourceforge.squirrel_sql.client.gui.desktopcontainer.docktabdesktop.DockTabDesktopPane do not have a common superclass |