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
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
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. {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)1.6
    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 index = _tabbedExecutionsPanel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY());
    Differences
    Expression1Expression2Difference
    tabindexVARIABLE_NAME_MISMATCH
    2
    int index = _tabbedExecutionsPanel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY());
    3
    if (-1 != tab)
    3
    if (-1 != tab)
    3
    if (-1 != index)
    Differences
    Expression1Expression2Difference
    tabindexVARIABLE_NAME_MISMATCH
    3
    if (-1 != index)
    4
    popup.show(e.getComponent(), e.getX(), e.getY());
    4
    popup.show(e.getComponent(), e.getX(), e.getY());
    Precondition Violations (0)
    Row Violation