public void modifyTestElement(TestElement s) { WebServiceSampler sampler = (WebServiceSampler) s; this.configureTestElement(sampler); sampler.setDomain(domain.getText()); sampler.setProperty(HTTPSamplerBase.PORT,port.getText()); sampler.setProtocol(protocol.getText()); sampler.setPath(path.getText()); sampler.setWsdlURL(wsdlField.getText()); sampler.setMethod(HTTPSamplerBase.POST); sampler.setSoapAction(soapAction.getText()); sampler.setXmlData(soapXml.getText()); sampler.setXmlFile(soapXmlFile.getFilename()); sampler.setXmlPathLoc(randomXmlFile.getText()); sampler.setTimeout(connectTimeout.getText()); sampler.setMemoryCache(memCache.isSelected()); sampler.setReadResponse(readResponse.isSelected()); sampler.setUseProxy(useProxy.isSelected()); sampler.setProxyHost(proxyHost.getText()); sampler.setProxyPort(proxyPort.getText());
public void configure(TestElement el) { super.configure(el); PublisherSampler sampler = (PublisherSampler) el; useProperties.setSelected(sampler.getUseJNDIPropertiesAsBoolean()); jndiICF.setText(sampler.getJNDIInitialContextFactory()); urlField.setText(sampler.getProviderUrl()); jndiConnFac.setText(sampler.getConnectionFactory()); jmsTopic.setText(sampler.getTopic()); jmsUser.setText(sampler.getUsername()); jmsPwd.setText(sampler.getPassword()); textMessage.setText(sampler.getTextMessage()); messageFile.setFilename(sampler.getInputFile()); randomFile.setFilename(sampler.getRandomPath()); configChoice.setText(sampler.getConfigChoice()); msgChoice.setText(sampler.getMessageChoice()); updateConfig(sampler.getConfigChoice()); iterations.setText(sampler.getIterations()); reqAuth.setText(sampler.getUseAuth());
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/jms/control/gui/JMSPublisherGui.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void modifyTestElement(TestElement s) {
1
public void configure(TestElement el) {
2
		WebService
2
		super.configure(el);
3
Sampler sampler = (WebServiceSampler) s;
3
		PublisherSampler sampler = (PublisherSampler) el;
4
		this.configureTestElement(sampler);
4
		
5
		sampler.setDomain(domain.getText());
6
        
5
useProperties.setSelected(sampler.getUseJNDIPropertiesAsBoolean());
7
sampler.setProperty(HTTPSamplerBase.PORT,port.getText());
6
		jndiICF.setText(sampler.get
8
        
7
JNDIInitialContextFactory());
9
sampler.setProtocol(protocol.getText());
8
		urlField.setText(sampler.getPro
10
		sampler.setPath(path.getText());
11
		sampler.setWsdlURL(wsdlField
9
viderUrl());
10
		jndiConnFac.setText(sampler.getConnectionFactory());
12
.getText());
11
		jmsTopic.setText(sampler.getTopic());
13
		sampler.setMethod(HTTPSamplerBase.POST);
12
		jmsUser.set
14
		sampler.setSoapAction(soapAction.getText());
15
		sampler.setXmlData(soapXml
13
Text(sampler.getUsername());
14
		jmsPwd.setText(sampler.getPassword());
16
.getText());
15
		textMessage.setText(sampler.getTextMessage());
17
		sampler.setXmlFile(soapXmlFile.getFilename());
16
		messageFile.setFilename(sampler.get
18
		sampler.setXmlPathLoc(
17
InputFile());
19
randomXmlFile.getText());
18
		randomFile.set
20
        sampler.setTimeout(connectTimeout.getText());
19
Filename(sampler.get
21
		
20
RandomPath());
22
sampler.setMemoryCache(memCache.isSelected());
21
		configChoice.setText(sampler.get
23
		
22
ConfigChoice());
24
sampler.setReadResponse(readResponse.isSelected());
23
		msgChoice.setText(sampler.get
25
		
24
MessageChoice());
26
sampler.setUseProxy(useProxy.isSelected());
25
		updateConfig(sampler.get
27
		sampler.setProxyHost(proxyHost.getText
26
ConfigChoice());
28
());
27
		iterations.setText(sampler.getIterations());
29
		sampler.setProxyPort(proxyPort.getText());
28
		reqAuth.setText(sampler.getUseAuth());
30
	
29
	
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