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: void modifyTestElement(TestElement)
|
Method name: void configure(TestElement)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 17 | |||
1 | super.configure(el);↵ | |||
1 | PublisherSampler sampler = (PublisherSampler) s;↵ | 2 | PublisherSampler sampler = (PublisherSampler) el;↵ | |
2 | this.configureTestElement(sampler);↵ | 3 | ↵ | |
3 | sampler.setUseJNDIProperties(String.valueOf(useProperties.isSelected()));↵ | 4 | useProperties.setSelected(sampler.getUseJNDIPropertiesAsBoolean());↵ | |
4 | sampler.setJNDIIntialContextFactory(jndiICF.getText());↵ | 5 | jndiICF.setText(sampler.getJNDIInitialContextFactory(↵ | |
5 | ↵ | 6 | ));↵ | |
6 | sampler.setProviderUrl(urlField.getText());↵ | 7 | urlField.setText(sampler.getProviderUrl(↵ | |
7 | ↵ | 8 | ));↵ | |
8 | sampler.setConnectionFactory(jndiConnFa↵ | 9 | jndiConnFac.setText(sampler.getConnectionFactory());↵ | |
9 | c.getText());↵ | 10 | jmsTopic.setText(↵ | |
10 | sampler.setTopic(jmsTopic.getText());↵ | 11 | sampler.getTopic(↵ | |
11 | ↵ | 12 | ));↵ | |
12 | sampler.setUsername(jmsUser.getText());↵ | 13 | jmsUser.setText(sampler.getUsername(↵ | |
13 | ↵ | 14 | ));↵ | |
14 | sampler.setPassword(jmsPwd.getText());↵ | 15 | jmsPwd.setText(sampler.getPassword(↵ | |
15 | ↵ | 16 | ));↵ | |
16 | sampler.setTextMessage(textM↵ | 17 | textMessage.setText(sampler.getTextMessage());↵ | |
17 | essage.getText());↵ | 18 | messageFile.set↵ | |
18 | sampler.setInputFile(message↵ | 19 | Filename(sampler.getInputFile());↵ | |
19 | File.getFilename());↵ | 20 | randomFile.setFilename(↵ | |
20 | sampler.setRandomPath(randomFil↵ | 21 | sampler.getRandomPath());↵ | |
21 | e.getFilename());↵ | 22 | configChoice.set↵ | |
22 | sampler.setConfigChoice(confi↵ | 23 | Text(sampler.getConfigChoice());↵ | |
23 | gChoice.getText());↵ | 24 | msgChoice.setText(↵ | |
24 | sampler.setMessageChoice(msgChoice.getText());↵ | 25 | sampler.getMessageChoice(↵ | |
25 | ↵ | 26 | ));↵ | |
26 | sampler.setIterations(↵ | 27 | updateConfig(sampler.getConfigChoice());↵ | |
27 | iterations.getText());↵ | 28 | iterations.setText(↵ | |
28 | sampler.setUseAuth(↵ | 29 | sampler.getIterations());↵ | |
29 | reqAuth.getText()); | 30 | reqAuth.setText(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 | 272 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 14 |
Number of unmapped statements in the second code fragment | 15 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | PublisherSampler sampler = (PublisherSampler)s; |
| 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()); |
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 |