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: TestElement createTestElement()
|
Method name: void configure(TestElement)
|
|||
Number of AST nodes: 17 | Number of AST nodes: 17 | |||
1 | super.configure(el);↵ | |||
1 | PublisherSampler sampler = new PublisherSampler();↵ | 2 | PublisherSampler sampler = (PublisherSampler) el;↵ | |
2 | this.configureTestElement(sampler);↵ | 3 | ↵ | |
3 | sampler.setUseJNDIProperties(String.valueOf(useProperties.isSelected()));↵ | 4 | useProperties.setSelected(sampler.getUseJNDIProperties↵ | |
4 | ↵ | 5 | AsBoolean());↵ | |
5 | sampler.setJNDIIntialContextFactory(jndiICF.getText());↵ | 6 | jndiICF.setText(sampler.getJNDIInitialContextFactory(↵ | |
6 | ↵ | 7 | ));↵ | |
7 | sampler.setProviderUrl(urlField.getText());↵ | 8 | urlField.setText(sampler.getProviderUrl(↵ | |
8 | ↵ | 9 | ));↵ | |
9 | sampler.setConnectionFactory(jndiConnFa↵ | 10 | jndiConnFac.setText(sampler.getConnectionFactory());↵ | |
10 | c.getText());↵ | 11 | jmsTopic.setText(↵ | |
11 | sampler.setTopic(jmsTopic.getText());↵ | 12 | sampler.getTopic(↵ | |
12 | ↵ | 13 | ));↵ | |
13 | sampler.setUsername(jmsUser.getText());↵ | 14 | jmsUser.setText(sampler.getUsername(↵ | |
14 | ↵ | 15 | ));↵ | |
15 | sampler.setPassword(jmsPwd.getText());↵ | 16 | jmsPwd.setText(sampler.getPassword(↵ | |
16 | ↵ | 17 | ));↵ | |
17 | sampler.setTextMessage(textMessage.getText());↵ | 18 | textMessage.setText(sampler.getTextMessage(↵ | |
18 | ↵ | 19 | ));↵ | |
19 | sampler.setInputFile(message↵ | 20 | messageFile.setFilename(sampler.getInputFile());↵ | |
20 | File.getFilename());↵ | 21 | randomFile.setFilename(↵ | |
21 | sampler.setRandomPath(randomFil↵ | 22 | sampler.getRandomPath());↵ | |
22 | e.getFilename());↵ | 23 | configChoice.set↵ | |
23 | sampler.setConfigChoice(confi↵ | 24 | Text(sampler.getConfigChoice());↵ | |
24 | gChoice.getText());↵ | 25 | msgChoice.setText(↵ | |
25 | sampler.setMessageChoice(msgChoice.getText());↵ | 26 | sampler.getMessageChoice(↵ | |
26 | ↵ | 27 | ));↵ | |
27 | sampler.setIterations(↵ | 28 | updateConfig(sampler.getConfigChoice());↵ | |
28 | iterations.getText());↵ | 29 | iterations.setText(↵ | |
29 | sampler.setUseAuth(↵ | 30 | sampler.getIterations());↵ | |
30 | reqAuth.getText());↵ | 31 | reqAuth.setText(↵ | |
31 | return sampler; | 32 | sampler.getUseAuth()); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 289 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 15 |
Number of unmapped statements in the second code fragment | 15 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | PublisherSampler sampler = new PublisherSampler(); |
| 2 | PublisherSampler sampler = (PublisherSampler)el; | |||||||||||||
2 | this.configureTestElement(sampler); |
| 1 | super.configure(el); | |||||||||||||
| 3 | useProperties.setSelected(sampler.getUseJNDIPropertiesAsBoolean()); | |||||||||||||||
3 | sampler.setUseJNDIProperties(String.valueOf(useProperties.isSelected())); | | |||||||||||||||
| 4 | jndiICF.setText(sampler.getJNDIInitialContextFactory()); | |||||||||||||||
4 | sampler.setJNDIIntialContextFactory(jndiICF.getText()); | | |||||||||||||||
| 5 | urlField.setText(sampler.getProviderUrl()); | |||||||||||||||
5 | sampler.setProviderUrl(urlField.getText()); | | |||||||||||||||
| 6 | jndiConnFac.setText(sampler.getConnectionFactory()); | |||||||||||||||
6 | sampler.setConnectionFactory(jndiConnFac.getText()); | | |||||||||||||||
| 7 | jmsTopic.setText(sampler.getTopic()); | |||||||||||||||
7 | sampler.setTopic(jmsTopic.getText()); | | |||||||||||||||
| 8 | jmsUser.setText(sampler.getUsername()); | |||||||||||||||
8 | sampler.setUsername(jmsUser.getText()); | | |||||||||||||||
| 9 | jmsPwd.setText(sampler.getPassword()); | |||||||||||||||
9 | sampler.setPassword(jmsPwd.getText()); | | |||||||||||||||
| 10 | textMessage.setText(sampler.getTextMessage()); | |||||||||||||||
10 | sampler.setTextMessage(textMessage.getText()); | | |||||||||||||||
| 11 | messageFile.setFilename(sampler.getInputFile()); | |||||||||||||||
11 | sampler.setInputFile(messageFile.getFilename()); | | |||||||||||||||
| 12 | randomFile.setFilename(sampler.getRandomPath()); | |||||||||||||||
12 | sampler.setRandomPath(randomFile.getFilename()); | | |||||||||||||||
| 13 | configChoice.setText(sampler.getConfigChoice()); | |||||||||||||||
13 | sampler.setConfigChoice(configChoice.getText()); | | |||||||||||||||
| 14 | msgChoice.setText(sampler.getMessageChoice()); | |||||||||||||||
14 | sampler.setMessageChoice(msgChoice.getText()); | | |||||||||||||||
| 15 | updateConfig(sampler.getConfigChoice()); | |||||||||||||||
15 | sampler.setIterations(iterations.getText()); | | |||||||||||||||
| 16 | iterations.setText(sampler.getIterations()); | |||||||||||||||
16 | sampler.setUseAuth(reqAuth.getText()); | | |||||||||||||||
| 17 | reqAuth.setText(sampler.getUseAuth()); | |||||||||||||||
17 | return sampler; | |
Row | Violation |
---|---|
1 | Expression this.configureTestElement(sampler) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression this.configureTestElement(sampler) is a void method call, and thus it cannot be parameterized |
3 | Expression super.configure(el) is a void method call, and thus it cannot be parameterized |