public void modifyTestElement(TestElement extractor) { super.configureTestElement(extractor); if ( extractor instanceof XPathExtractor){ XPathExtractor xpath = (XPathExtractor)extractor; xpath.setDefaultValue(defaultField.getText()); xpath.setRefName(refNameField.getText()); xpath.setXPathQuery(xpathQueryField.getText()); xpath.setTolerant(tolerant.isSelected()); xpath.setNameSpace(nameSpace.isSelected()); xpath.setShowWarnings(showWarnings.isSelected()); xpath.setReportErrors(reportErrors.isSelected()); xpath.setQuiet(quiet.isSelected()); }
public void modifyTestElement(TestElement s) { this.configureTestElement(s); if (s instanceof SoapSampler) { SoapSampler sampler = (SoapSampler) s; sampler.setURLData(urlField.getText()); sampler.setXmlData(soapXml.getText()); sampler.setXmlFile(soapXmlFile.getFilename()); sampler.setSOAPAction(soapAction.getText()); sampler.setSendSOAPAction(sendSoapAction.isSelected()); sampler.setUseKeepAlive(useKeepAlive.isSelected()); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/extractor/gui/XPathExtractorGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/control/gui/SoapSamplerGui.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void modifyTestElement(TestElement extractor) {
1
public void modifyTestElement(TestElement 
2
        super.configureTestElement(extractor);
3
        if ( extractor instanceof XPathExtracto
2
s) {
3
		this.configureTestElement(s);
4
r){
4
		if (s instanceof SoapSampler) {
5
            XPathExtractor xpath = (XPathExtractor)extractor;
6
            xpath.setDefaultValue(defaultField.getText());
7
            xpath.setRefName(refNameField.getText());
8
            xpath.setXPathQuery(xpathQueryField.getText());
9
            xpath.setTolerant(tolerant.isSelected());
10
            xpath.setNameSpace(nameSpace.isSelected());
11
            xpath.setShowWarnings(showWarnings.isSelected());
12
            xpath.setReportErrors(reportErrors.isSelected());
13
            xpath.setQuiet(quiet
5
			SoapSampler sampler = (SoapSampler) s;
6
			sampler.setURLData(urlField.getText());
7
			sampler.setXmlData(soapXml.getText());
8
            sampler.setXmlFile(soapXmlFile.getFilename());
9
			sampler.setSOAPAction(soapAction.getText());
10
			sampler.setSendSOAPAction(sendSoapAction.isSelected());
14
.isSelected());
11
			sampler.setUseKeepAlive(useKeepAlive.isSelected());
15
        }
16
    
12
		}
13
	
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0