File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/extractor/gui/RegexExtractorGui.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 | super.configureTestElement(extractor);↵ | 1 | this.configureTestElement(s);↵ | |
2 | if (extractor instanceof RegexExtractor) {↵ | 2 | if (s instanceof ↵ | |
3 | RegexExtractor regex = (RegexExtractor) extractor;↵ | |||
4 | regex.setUseField(group.getSelection().getActionCommand↵ | 3 | SoapSampler) {↵ | |
4 | SoapSampler sampler = (SoapSampler) s;↵ | |||
5 | ()); ↵ | 5 | sampler.setURLData(urlField.getText());↵ | |
6 | regex.setRefName(refNameField.getText());↵ | 6 | ↵ | |
7 | regex.setRegex(regexField.getText());↵ | |||
8 | regex.setTemplate(templateField↵ | 7 | sampler.setXmlData(soapXml.getText());↵ | |
8 | sampler.setXmlFile(soapXmlFile.getFilename());↵ | |||
9 | .getText());↵ | 9 | sampler.setSOAPAction(soapAction.getText());↵ | |
10 | regex.setDefaultValue(defaultField.getText());↵ | 10 | ↵ | |
11 | regex.setMatchNumber(matchNumberField.getText↵ | 11 | sampler.setSendSOAPAction(sendSoapAction.isSelected());↵ | |
12 | ());↵ | 12 | sampler.setUseKeepAlive(useKeepAlive.isSelected());↵ | |
13 | } | 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 | 65 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 18.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | super.configureTestElement(extractor); |
| 1 | this.configureTestElement(s); | |||||||||||||||||||||||||||||
2 | if (extractor instanceof RegexExtractor) |
| 2 | if (s instanceof SoapSampler) | |||||||||||||||||||||||||||||
3 | RegexExtractor regex = (RegexExtractor)extractor; |
| 3 | SoapSampler sampler = (SoapSampler)s; | |||||||||||||||||||||||||||||
4 | regex.setUseField(group.getSelection().getActionCommand()); | | |||||||||||||||||||||||||||||||
5 | regex.setRefName(refNameField.getText()); |
| 4 | sampler.setURLData(urlField.getText()); | |||||||||||||||||||||||||||||
6 | regex.setRegex(regexField.getText()); |
| 5 | sampler.setXmlData(soapXml.getText()); | |||||||||||||||||||||||||||||
7 | regex.setTemplate(templateField.getText()); |
| 6 | sampler.setXmlFile(soapXmlFile.getFilename()); | |||||||||||||||||||||||||||||
8 | regex.setDefaultValue(defaultField.getText()); |
| 7 | sampler.setSOAPAction(soapAction.getText()); | |||||||||||||||||||||||||||||
| 8 | sampler.setSendSOAPAction(sendSoapAction.isSelected()); | |||||||||||||||||||||||||||||||
| 9 | sampler.setUseKeepAlive(useKeepAlive.isSelected()); | |||||||||||||||||||||||||||||||
9 | regex.setMatchNumber(matchNumberField.getText()); | |
Row | Violation |
---|---|
1 | Expression super.configureTestElement(extractor) is a void method call, and thus it cannot be parameterized |
2 | Expression this.configureTestElement(s) is a void method call, and thus it cannot be parameterized |
3 | Expression regex.setRefName(refNameField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression sampler.setURLData(urlField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression regex.setRefName(refNameField.getText()) is a void method call, and thus it cannot be parameterized |
6 | Expression sampler.setURLData(urlField.getText()) is a void method call, and thus it cannot be parameterized |
7 | Expression regex.setRegex(regexField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression sampler.setXmlData(soapXml.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression regex.setRegex(regexField.getText()) is a void method call, and thus it cannot be parameterized |
10 | Expression sampler.setXmlData(soapXml.getText()) is a void method call, and thus it cannot be parameterized |
11 | Expression regexField cannot be unified with expression soapXml , because common superclass javax.swing.JPanel does not declare member(s) public java.lang.String getText() |
12 | Expression regex.setTemplate(templateField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression sampler.setXmlFile(soapXmlFile.getFilename()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression regex.setTemplate(templateField.getText()) is a void method call, and thus it cannot be parameterized |
15 | Expression sampler.setXmlFile(soapXmlFile.getFilename()) is a void method call, and thus it cannot be parameterized |
16 | Expression regex.setDefaultValue(defaultField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression sampler.setSOAPAction(soapAction.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression regex.setDefaultValue(defaultField.getText()) is a void method call, and thus it cannot be parameterized |
19 | Expression sampler.setSOAPAction(soapAction.getText()) is a void method call, and thus it cannot be parameterized |
20 | Clone fragment #1 returns variable regex with type org.apache.jmeter.extractor.RegexExtractor , while Clone fragment #2 returns variable sampler with type org.apache.jmeter.protocol.http.sampler.SoapSampler |