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());
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/jms/control/gui/JMSPublisherGui.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 configure(TestElement el) {
1
public 
2
		super.configure(el);
2
TestElement createTestElement() {
3
		PublisherSampler sampler = (PublisherSampler) el;
3
		PublisherSampler sampler = new PublisherSampler();
4
		useProperties.setSelected(sampler.getUseJNDIPropertiesAsBoolean());
4
		
5
		jndiICF.setText(
5
this.configureTestElement(sampler);
6
		sampler.setUseJNDIProperties(String.valueOf(useProperties.isSelected()));
6
sampler.getJNDIInitialContextFactory());
7
		sampler.setJNDIIntialContextFactory(
7
		urlField.setText(
8
jndiICF.getText());
8
sampler.getProviderUrl());
9
		sampler.setProviderUrl(
9
		jndiConnFac.setText(
10
urlField.getText());
10
sampler.getConnectionFactory());
11
		sampler.setConnectionFactory(
11
		jmsTopic.setText(
12
jndiConnFac.getText());
12
sampler.getTopic());
13
		sampler.setTopic(
13
		jmsUser.setText(
14
jmsTopic.getText());
14
sampler.getUsername());
15
		sampler.setUsername(
15
		jmsPwd.setText(
16
jmsUser.getText());
16
sampler.getPassword());
17
		sampler.setPassword(
17
		textMessage.setText(
18
jmsPwd.getText());
18
sampler.getTextMessage());
19
		sampler.setTextMessage(
19
		messageFile.setFilename(
20
textMessage.getText());
20
sampler.getInputFile());
21
		sampler.setInputFile(
21
		randomFile.setFilename(
22
messageFile.getFilename());
22
sampler.getRandomPath());
23
		sampler.setRandomPath(
23
		configChoice.setText(
24
randomFile.getFilename());
24
sampler.getConfigChoice());
25
		sampler.setConfigChoice(
25
		msgChoice.setText(
26
configChoice.getText());
26
sampler.getMessageChoice());
27
		sampler.setMessageChoice(
27
		updateConfig(sampler.getConfigChoice());
28
		
28
msgChoice.getText());
29
iterations.setText(
29
		sampler.setIterations(iterations.getText());
30
sampler.getIterations());
30
		sampler.set
31
		reqAuth.setText(sampler.getUseAuth())
31
UseAuth(reqAuth.getText());
32
;
32
		return sampler;
33
	
33
	
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