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
      }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes having the same super class
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)9.7
    Clone typeType 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 = _tabbedExecutionsPanel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY());
    2
    int tab = _tabbedPane.getUI().tabForCoordinate(_tabbedPane, e.getX(), e.getY());
    Differences
    Expression1Expression2Difference
    _tabbedExecutionsPanel_tabbedPaneVARIABLE_NAME_MISMATCH
    javax.swing.JTabbedPanenet.sourceforge.squirrel_sql.client.gui.desktopcontainer.docktabdesktop.DesktopTabbedPaneSUBCLASS_TYPE_MISMATCH
    _tabbedExecutionsPanel_tabbedPaneVARIABLE_NAME_MISMATCH
    javax.swing.JTabbedPanenet.sourceforge.squirrel_sql.client.gui.desktopcontainer.docktabdesktop.DesktopTabbedPaneSUBCLASS_TYPE_MISMATCH
    2
    int tab = _tabbedPane.getUI().tabForCoordinate(_tabbedPane, e.getX(), e.getY());
    3
    if (-1 != tab)
    3
    if (-1 != tab)
    4
    popup.show(e.getComponent(), e.getX(), e.getY());
    4
    popup.show(e.getComponent(), e.getX(), e.getY());
    4
    _tabRightMouseMenu.show(e.getComponent(), e.getX(), e.getY());
    Differences
    Expression1Expression2Difference
    popup_tabRightMouseMenuVARIABLE_NAME_MISMATCH
    4
    _tabRightMouseMenu.show(e.getComponent(), e.getX(), e.getY());
    Precondition Violations (1)
    Row Violation
    1The 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