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 index =
_tabbedExecutionsPanel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY());
if (-1 != index)
{
popup.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/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/explain/ExplainExecuterPanel.java
|
Method name: void maybeShowPopup(MouseEvent, JPopupMenu)
|
|
Method name: void showPopup(MouseEvent, JPopupMenu)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (e.isPopupTrigger())↵ | | 1 | if (e.isPopupTrigger())↵
|
2 | {↵ | | |
|
3 | int tab = ↵ | | |
|
| | | 2 | {↵
|
| | | 3 | int index =↵
|
4 | _tabbedExecutionsPanel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY());↵ | | 4 | _tabbedExecutionsPanel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY());↵
|
5 | if (-1 != tab)↵ | | |
|
6 | {↵ | | |
|
7 | ↵ | | |
|
| | | 5 | if (-1 != index)↵
|
| | | 6 | {↵
|
8 | popup.show(e.getComponent(), e.getX(), e.getY());↵ | | 7 | popup.show(e.getComponent(), e.getX(), e.getY());↵
|
9 | }↵ | | |
|
10 | ↵ | | |
|
| | | 8 | }↵
|
11 | } | | 9 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 | 8 |
-
{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) | 1.6 |
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 index = _tabbedExecutionsPanel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY()); |
3 | | | 3 | |
4 | popup.show(e.getComponent(), e.getX(), e.getY()); | | 4 | popup.show(e.getComponent(), e.getX(), e.getY()); |
Precondition Violations (0)
Row |
Violation |