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 TestElement createTestElement() { PublisherSampler sampler = new PublisherSampler(); this.configureTestElement(sampler); sampler.setUseJNDIProperties(String.valueOf(useProperties.isSelected())); sampler.setJNDIIntialContextFactory(jndiICF.getText()); sampler.setProviderUrl(urlField.getText()); sampler.setConnectionFactory(jndiConnFac.getText()); sampler.setTopic(jmsTopic.getText()); sampler.setUsername(jmsUser.getText()); sampler.setPassword(jmsPwd.getText()); sampler.setTextMessage(textMessage.getText()); sampler.setInputFile(messageFile.getFilename()); sampler.setRandomPath(randomFile.getFilename()); sampler.setConfigChoice(configChoice.getText()); sampler.setMessageChoice(msgChoice.getText()); sampler.setIterations(iterations.getText()); sampler.setUseAuth(reqAuth.getText()); return sampler;
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 TestElement createTestElement() {
2
		WebServiceSampler sampler = (WebServiceSampler) s;
2
		PublisherSampler sampler = new PublisherSampler();
3
		this.configureTestElement(sampler);
3
		this.configureTestElement(sampler);
4
		sampler.setDomain(domain.getText());
4
		sampler.set
5
        sampler.setProperty(HTTPSamplerBase.PORT,port
5
UseJNDIProperties(String.valueOf(useProperties.isSelected()));
6
.getText());
6
		sampler.setJNDIIntialContextFactory(jndiICF.getText());
7
        sampler.setProtocol(protocol.getText());
7
		sampler.setProviderUrl(urlField.getText());
8
		sampler.setPath(path.getText());
8
		sampler.setConnectionFactory(jndiConnFac.getText());
9
		sampler.setWsdlURL(wsdlField.getText());
9
		sampler.setTopic(jmsTopic.getText());
10
		sampler.setMethod(HTTPSamplerBase.POST);
10
		sampler.set
11
		sampler.setSoapAction(soapAction
11
Username(jmsUser.getText());
12
.getText());
12
		sampler.setPassword(jmsPwd.getText());
13
		sampler.setXmlData(soapXml.getText());
13
		sampler.setTextMessage(textMessage.getText());
14
		sampler.setXmlFile(soapXmlFile.getFilename());
14
		sampler.setInputFile(messageFile.getFilename());
15
		sampler.setXmlPathLoc(randomXmlFile.getText());
15
		sampler.setRandomPath(randomFile.get
16
        sampler.setTimeout(connectTimeout
16
Filename());
17
.getText());
17
		sampler.setConfigChoice(configChoice.getText());
18
		sampler.setMemoryCache(memCache.isSelected());
18
		sampler.setMe
19
		sampler.setReadResponse(readResponse.isSelected());
20
		sampler.setUseProxy(useProxy.isSelected());
21
		sampler.setProxyHost(proxyHost.getText());
22
		sampler.setProxyPort(proxyPort.getText())
19
ssageChoice(msgChoice.getText());
20
		sampler.setIterations(iterations.getText());
21
		sampler.setUseAuth(reqAuth.getText());
23
;
22
		return sampler;
24
	
23
	
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