File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/modifiers/gui/CounterConfigGui.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/control/gui/SoapSamplerGui.java | |||
Method name: void modifyTestElement(TestElement)
|
Method name: void modifyTestElement(TestElement)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | this.configureTestElement(s);↵ | |||
1 | if (c instanceof CounterConfig) {↵ | 2 | if (s instanceof ↵ | |
2 | CounterConfig config = (CounterConfig↵ | 3 | SoapSampler) {↵ | |
3 | ) c;↵ | 4 | SoapSampler sampler = (SoapSampler) s;↵ | |
4 | config.setStart(startField.getText());↵ | 5 | ↵ | |
5 | // Bug 22820 if (endField.getText().length() > 0)↵ | |||
6 | {↵ | |||
7 | config.setEnd(endField.getText());↵ | |||
8 | }↵ | |||
9 | config.setIncrement(incrField.getText());↵ | |||
10 | config.setVarName(varNameField.getText());↵ | |||
11 | config.setFormat(formatField.getText↵ | 6 | sampler.setURLData(urlField.getText());↵ | |
7 | sampler.setXmlData(soapXml.getText());↵ | |||
8 | sampler.setXmlFile(soapXmlFile.getFilename());↵ | |||
9 | sampler.setSOAPAction(soapAction.getText());↵ | |||
12 | ());↵ | 10 | sampler.setSendSOAPAction(sendSoapAction.isSelected());↵ | |
13 | config.setIsPerUser(perUserField.isSelected());↵ | 11 | ↵ | |
14 | }↵ | |||
15 | super.configureTestElement(c); | 12 | sampler.setUseKeepAlive(useKeepAlive.isSelected());↵ | |
13 |
| |||
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 58 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 5702.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (c instanceof CounterConfig) |
| 2 | if (s instanceof SoapSampler) | |||||||||||||||||||||||||||||
2 | CounterConfig config = (CounterConfig)c; |
| 3 | SoapSampler sampler = (SoapSampler)s; | |||||||||||||||||||||||||||||
3 | config.setStart(startField.getText()); |
| 4 | sampler.setURLData(urlField.getText()); | |||||||||||||||||||||||||||||
5 | config.setIncrement(incrField.getText()); |
| 7 | sampler.setSOAPAction(soapAction.getText()); | |||||||||||||||||||||||||||||
6 | config.setVarName(varNameField.getText()); |
| 5 | sampler.setXmlData(soapXml.getText()); | |||||||||||||||||||||||||||||
7 | config.setFormat(formatField.getText()); |
| 6 | sampler.setXmlFile(soapXmlFile.getFilename()); | |||||||||||||||||||||||||||||
8 | config.setIsPerUser(perUserField.isSelected()); |
| 8 | sampler.setSendSOAPAction(sendSoapAction.isSelected()); | |||||||||||||||||||||||||||||
| 9 | sampler.setUseKeepAlive(useKeepAlive.isSelected()); | |||||||||||||||||||||||||||||||
4 | config.setEnd(endField.getText()); | | |||||||||||||||||||||||||||||||
9 | super.configureTestElement(c); |
| 1 | this.configureTestElement(s); |
Row | Violation |
---|---|
1 | Expression config.setStart(startField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression sampler.setURLData(urlField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression config.setStart(startField.getText()) is a void method call, and thus it cannot be parameterized |
4 | Expression sampler.setURLData(urlField.getText()) is a void method call, and thus it cannot be parameterized |
5 | Expression config.setIncrement(incrField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression sampler.setSOAPAction(soapAction.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression config.setIncrement(incrField.getText()) is a void method call, and thus it cannot be parameterized |
8 | Expression sampler.setSOAPAction(soapAction.getText()) is a void method call, and thus it cannot be parameterized |
9 | Expression config.setVarName(varNameField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression sampler.setXmlData(soapXml.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression config.setVarName(varNameField.getText()) is a void method call, and thus it cannot be parameterized |
12 | Expression sampler.setXmlData(soapXml.getText()) is a void method call, and thus it cannot be parameterized |
13 | Expression varNameField cannot be unified with expression soapXml , because common superclass javax.swing.JPanel does not declare member(s) public java.lang.String getText() |
14 | Expression config.setFormat(formatField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression sampler.setXmlFile(soapXmlFile.getFilename()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression config.setFormat(formatField.getText()) is a void method call, and thus it cannot be parameterized |
17 | Expression sampler.setXmlFile(soapXmlFile.getFilename()) is a void method call, and thus it cannot be parameterized |
18 | Expression config.setIsPerUser(perUserField.isSelected()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression sampler.setSendSOAPAction(sendSoapAction.isSelected()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression config.setIsPerUser(perUserField.isSelected()) is a void method call, and thus it cannot be parameterized |
21 | Expression sampler.setSendSOAPAction(sendSoapAction.isSelected()) is a void method call, and thus it cannot be parameterized |
22 | Expression super.configureTestElement(c) is a void method call, and thus it cannot be parameterized |
23 | Expression this.configureTestElement(s) is a void method call, and thus it cannot be parameterized |
24 | Clone fragment #1 returns variable config with type org.apache.jmeter.modifiers.CounterConfig , while Clone fragment #2 returns variable sampler with type org.apache.jmeter.protocol.http.sampler.SoapSampler |