if (popup != null) { popup.pack(); popup.show(tree, e.getX(), e.getY()); popup.setVisible(true); popup.requestFocus(); }
super.clearGui(); filename.setText(""); //$NON-NLS-1$ errorsOnly.setSelected(false); successOnly.setSelected(false);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/tree/ReportTreeListener.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/reporters/gui/ResultSaverGui.java
Method name: void displayPopUp(MouseEvent, JPopupMenu) Method name: void clearGui()
Number of AST nodes: 5 Number of AST nodes: 4
1
if (popup != null) {
2
			popup.pack();
3
			popup.show(tree, 
1
super.clearGui();
2
        
4
e.getX(), e.getY());
3
        filename.set
5
			popup.setVisible(true);
6
			popup.requestFocus();
7
		}
4
Text(""); //$NON-NLS-1$
5
        errorsOnly.setSelected(false);
6
        successOnly.setSelected(false);
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.0
Clones locationClones are in different classes
Number of node comparisons16
  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)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    popup.pack();
    3
    popup.pack();
    1
    super.clearGui();
    Differences
    Expression1Expression2Difference
    popup.pack()super.clearGui()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression popup.pack() is a void method call, and thus it cannot be parameterized
    Expression super.clearGui() is a void method call, and thus it cannot be parameterized
    1
    super.clearGui();
    4
    popup.show(tree, e.getX(), e.getY());
    4
    popup.show(tree, e.getX(), e.getY());
    4
    successOnly.setSelected(false);
    Differences
    Expression1Expression2Difference
    showsetSelectedMETHOD_INVOCATION_NAME_MISMATCH
    popupsuccessOnlyVARIABLE_NAME_MISMATCH
    javax.swing.JPopupMenujavax.swing.JCheckBoxSUBCLASS_TYPE_MISMATCH
    popup.show(tree,e.getX(),e.getY())successOnly.setSelected(false)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression popup.show(tree,e.getX(),e.getY()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression popup.show(tree,e.getX(),e.getY()) is a void method call, and thus it cannot be parameterized
    Expression successOnly.setSelected(false) is a void method call, and thus it cannot be parameterized
    Expression popup.show(tree,e.getX(),e.getY()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression popup.show(tree,e.getX(),e.getY()) is a void method call, and thus it cannot be parameterized
    Expression successOnly.setSelected(false) is a void method call, and thus it cannot be parameterized
    4
    successOnly.setSelected(false);
    5
    popup.setVisible(true);
    5
    popup.setVisible(true);
    3
    errorsOnly.setSelected(false);
    Differences
    Expression1Expression2Difference
    setVisiblesetSelectedMETHOD_INVOCATION_NAME_MISMATCH
    truefalseLITERAL_VALUE_MISMATCH
    popuperrorsOnlyVARIABLE_NAME_MISMATCH
    javax.swing.JPopupMenujavax.swing.JCheckBoxSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression popup.setVisible(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression popup.setVisible(true) is a void method call, and thus it cannot be parameterized
    Expression errorsOnly.setSelected(false) is a void method call, and thus it cannot be parameterized
    3
    errorsOnly.setSelected(false);
    6
    popup.requestFocus();
    6
    popup.requestFocus();
    2
    filename.setText("");
    Differences
    Expression1Expression2Difference
    requestFocussetTextMETHOD_INVOCATION_NAME_MISMATCH
    popupfilenameVARIABLE_NAME_MISMATCH
    javax.swing.JPopupMenujavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    popup.requestFocus()filename.setText("")ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression popup.requestFocus() is a void method call, and thus it cannot be parameterized
    Expression filename.setText("") is a void method call, and thus it cannot be parameterized
    Expression popup.requestFocus() is a void method call, and thus it cannot be parameterized
    Expression filename.setText("") is a void method call, and thus it cannot be parameterized
    2
    filename.setText("");
    Precondition Violations (15)
    Row Violation
    1Expression popup.pack() is a void method call, and thus it cannot be parameterized
    2Expression super.clearGui() is a void method call, and thus it cannot be parameterized
    3Expression popup.show(tree,e.getX(),e.getY()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression popup.show(tree,e.getX(),e.getY()) is a void method call, and thus it cannot be parameterized
    5Expression successOnly.setSelected(false) is a void method call, and thus it cannot be parameterized
    6Expression popup.show(tree,e.getX(),e.getY()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression popup.show(tree,e.getX(),e.getY()) is a void method call, and thus it cannot be parameterized
    8Expression successOnly.setSelected(false) is a void method call, and thus it cannot be parameterized
    9Expression popup.setVisible(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression popup.setVisible(true) is a void method call, and thus it cannot be parameterized
    11Expression errorsOnly.setSelected(false) is a void method call, and thus it cannot be parameterized
    12Expression popup.requestFocus() is a void method call, and thus it cannot be parameterized
    13Expression filename.setText("") is a void method call, and thus it cannot be parameterized
    14Expression popup.requestFocus() is a void method call, and thus it cannot be parameterized
    15Expression filename.setText("") is a void method call, and thus it cannot be parameterized