if (e.isPopupTrigger()) { m_lstPopup.show(e.getComponent(), e.getX(), e.getY()); }
if (evt.isPopupTrigger()) { displayPopupMenu(evt); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/graph/src/net/sourceforge/squirrel_sql/plugins/graph/FormatController.java File path: /sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs/QueryTree.java
Method name: void maybeShowListPopUp(MouseEvent) Method name: void mouseReleased(MouseEvent)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (e.isPopupTrigger())
1
if (evt.isPopupTrigger())
2
      {
3
         m_lstPopup.show(e.getComponent(), e.getX(), e.getY());
4
      
2
 {
3
					displayPopupMenu(evt);
5
}
4
				}
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.1
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)61.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (e.isPopupTrigger())
    1
    if (e.isPopupTrigger())
    1
    if (evt.isPopupTrigger())
    Differences
    Expression1Expression2Difference
    eevtVARIABLE_NAME_MISMATCH
    1
    if (evt.isPopupTrigger())
    2
    m_lstPopup.show(e.getComponent(), e.getX(), e.getY());
    2
    m_lstPopup.show(e.getComponent(), e.getX(), e.getY());
    2
    displayPopupMenu(evt);
    Differences
    Expression1Expression2Difference
    showdisplayPopupMenuMETHOD_INVOCATION_NAME_MISMATCH
    m_lstPopup.show(e.getComponent(),e.getX(),e.getY())displayPopupMenu(evt)ARGUMENT_NUMBER_MISMATCH
    m_lstPopupMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression m_lstPopup.show(e.getComponent(),e.getX(),e.getY()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression displayPopupMenu(evt) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method displayPopupMenu
    Expression m_lstPopup.show(e.getComponent(),e.getX(),e.getY()) is a void method call, and thus it cannot be parameterized
    Expression displayPopupMenu(evt) is a void method call, and thus it cannot be parameterized
    Expression m_lstPopup.show(e.getComponent(),e.getX(),e.getY()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression displayPopupMenu(evt) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method displayPopupMenu
    Expression m_lstPopup.show(e.getComponent(),e.getX(),e.getY()) is a void method call, and thus it cannot be parameterized
    Expression displayPopupMenu(evt) is a void method call, and thus it cannot be parameterized
    2
    displayPopupMenu(evt);
    Precondition Violations (9)
    Row Violation
    1Expression m_lstPopup.show(e.getComponent(),e.getX(),e.getY()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression displayPopupMenu(evt) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression m_lstPopup.show(e.getComponent(),e.getX(),e.getY()) is a void method call, and thus it cannot be parameterized
    4Expression displayPopupMenu(evt) is a void method call, and thus it cannot be parameterized
    5Expression m_lstPopup.show(e.getComponent(),e.getX(),e.getY()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression displayPopupMenu(evt) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression m_lstPopup.show(e.getComponent(),e.getX(),e.getY()) is a void method call, and thus it cannot be parameterized
    8Expression displayPopupMenu(evt) is a void method call, and thus it cannot be parameterized
    9The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.graph.FormatController and do not have a common superclass