public void configure(TestElement el) { super.configure(el); if (el instanceof RegexExtractor){ RegexExtractor re = (RegexExtractor) el; useHeaders.setSelected(re.useHeaders()); useBody.setSelected(re.useBody()); useURL.setSelected(re.useUrl()); useCode.setSelected(re.useCode()); useMessage.setSelected(re.useMessage()); regexField.setText(re.getRegex()); templateField.setText(re.getTemplate()); defaultField.setText(re.getDefaultValue()); matchNumberField.setText(re.getMatchNumberAsString()); refNameField.setText(re.getRefName()); }
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/RegexExtractorGui.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 configure(TestElement el) {
2
		super.configure(el);
3
		if (el instanceof RegexExtractor){
1
if (s instanceof SoapSampler) {
4
			RegexExtractor re = (RegexExtractor) el;
2
			SoapSampler sampler = (SoapSampler) s;
5
			useHeaders.setSelected(re.useHeaders());
3
			sampler.setURLData(urlField.getText());
6
			useBody.setSelected(re.useBody());
4
			
7
	        useURL.setSelected(re.useUrl());
5
sampler.setXmlData(soapXml.getText());
8
	        useCode.setSelected(re.useCode());
6
        
9
	        useMessage.setSelected(re.useMessage());
10
			regexField.setText(re.getRegex());
7
    sampler.setXmlFile(soapXmlFile.getFilename());
11
			templateField.setText(re.getTemplate());
8
			sampl
12
			defaultField.setText(re.getDefaultValue());
13
			matchNumberField.setText(re.getMatchNumberAsString());
14
			refNameField.setText(re.getRefName
9
er.setSOAPAction(soapAction.getText());
10
			sampler.setSendSOAPAction(sendSoapAction.isSelected());
15
());
11
			sampler.setUseKeepAlive(useKeepAlive.isSelected());
16
		}
12
		
17
	
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