File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/ProxyControl.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/ProxyControl.java | |||
Method name: Collection findApplicableElements(JMeterTreeNode, Class, boolean)
|
Method name: Collection findApplicableElements(JMeterTreeNode, Class, boolean)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 6 | |||
1 | if (element instanceof TestPlan) {↵ | 1 | if (subNode.isEnabled()) {↵ | |
2 | TestPlan tp = (TestPlan) element;↵ | 2 | Test↵ | |
3 | Arguments args = tp.getArguments();↵ | 3 | Element element = (TestElement) subNode.getUserObject();↵ | |
4 | if (myClass.isInstance(args)) {↵ | 4 | if (myClass.isInstance(element)) {↵ | |
5 | if (ascending) {↵ | 5 | if (ascending) {↵ | |
6 | elements.addFirst(args);↵ | 6 | elements.addFirst(element);↵ | |
7 | } else {↵ | 7 | } else {↵ | |
8 | elements.add(args);↵ | 8 | elements.add(element);↵ | |
9 | }↵ | 9 | }↵ | |
10 | }↵ | 10 | }↵ | |
11 | } | 11 | } | |
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 15 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 3.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 7 | TestElement element = (TestElement)subNode.getUserObject(); | |||||||||||||||
24 | TestPlan tp = (TestPlan)element; | | ||||||||||||||||
25 | Arguments args = tp.getArguments(); |
| | |||||||||||||||
26 | if (myClass.isInstance(args)) |
| 8 | if (myClass.isInstance(element)) | ||||||||||||||
27 | if (ascending) | 9 | if (ascending) | |||||||||||||||
28 | elements.addFirst(args); |
| 10 | elements.addFirst(element); | ||||||||||||||
else | else | |||||||||||||||||
29 | elements.add(args); |
| 11 | elements.add(element); |
Row | Violation |
---|---|
1 | Unmatched statement TestElement element=(TestElement)subNode.getUserObject(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement Arguments args=tp.getArguments(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type org.apache.jmeter.config.Arguments of variable args does not match with type org.apache.jmeter.testelement.TestElement of variable element |
4 | Type org.apache.jmeter.config.Arguments of variable args does not match with type org.apache.jmeter.testelement.TestElement of variable element |
5 | Type org.apache.jmeter.config.Arguments of variable args does not match with type org.apache.jmeter.testelement.TestElement of variable element |