if (el instanceof XPathAssertion) { XPathAssertion assertion = (XPathAssertion) el; assertion.setNegated(xpath.isNegated()); assertion.setXPathString(xpath.getXPath()); xml.modifyTestElement(assertion); }
this.SERVERMAP.clear(); ROOTNODE.removeAllChildren(); SERVERTREE.updateUI(); GRAPH.clearData();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/XPathAssertionGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/MonitorPerformancePanel.java
Method name: void modifyTestElement(TestElement) Method name: void clearData()
Number of AST nodes: 5 Number of AST nodes: 4
1
if (el instanceof XPathAssertion) {
2
			XPathAssertion assertion = (XPathAssertion) el;
3
			assertion.setNegated(xpath.isNegated()
1
this.SERVERMAP.clear();
4
);
2
		ROOTNODE.removeAllChildren();
5
			assertion.setXPathString(xpath.getXPath());
3
		
6
			xml.modifyTestElement(assertion);
7
		}
4
SERVERTREE.updateUI();
5
		GRAPH.clearData();
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 having the same super class
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                        
    1
    this.SERVERMAP.clear();
                                                                    
    2
    ROOTNODE.removeAllChildren();
                                                      
    3
    SERVERTREE.updateUI();
    3
    XPathAssertion assertion = (XPathAssertion)el;
                                                                                                  
    4
    assertion.setNegated(xpath.isNegated());
                                                                                          
    5
    assertion.setXPathString(xpath.getXPath());
                                                                                                
    6
    xml.modifyTestElement(assertion);
    6
    xml.modifyTestElement(assertion);
    4
    GRAPH.clearData();
    Differences
    Expression1Expression2Difference
    modifyTestElementclearDataMETHOD_INVOCATION_NAME_MISMATCH
    xmlGRAPHVARIABLE_NAME_MISMATCH
    org.apache.jmeter.assertions.gui.XMLConfPanelorg.apache.jmeter.visualizers.MonitorGraphSUBCLASS_TYPE_MISMATCH
    xml.modifyTestElement(assertion)GRAPH.clearData()ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression xml.modifyTestElement(assertion) is a void method call, and thus it cannot be parameterized
    Expression GRAPH.clearData() is a void method call, and thus it cannot be parameterized
    Expression xml.modifyTestElement(assertion) is a void method call, and thus it cannot be parameterized
    Expression GRAPH.clearData() is a void method call, and thus it cannot be parameterized
    4
    GRAPH.clearData();
    Precondition Violations (4)
    Row Violation
    1Expression xml.modifyTestElement(assertion) is a void method call, and thus it cannot be parameterized
    2Expression GRAPH.clearData() is a void method call, and thus it cannot be parameterized
    3Expression xml.modifyTestElement(assertion) is a void method call, and thus it cannot be parameterized
    4Expression GRAPH.clearData() is a void method call, and thus it cannot be parameterized