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: 6 | Number of AST nodes: 6 | |||
1 | if (subNode.isEnabled()) {↵ | |||
2 | TestElement element = (TestElement) subNode.getUserObject↵ | 1 | TestPlan tp = (TestPlan) element;↵ | |
3 | ();↵ | 2 | Arguments args = tp.getArguments();↵ | |
4 | if (myClass.isInstance(element)) {↵ | 3 | if (myClass.isInstance(args)) {↵ | |
5 | if (ascending) {↵ | 4 | if (ascending) {↵ | |
6 | elements.addFirst(element);↵ | 5 | elements.addFirst(args);↵ | |
7 | } else {↵ | 6 | } else {↵ | |
8 | elements.add(element);↵ | 7 | elements.add(args);↵ | |
9 | }↵ | 8 | }↵ | |
10 | }↵ | 9 | ↵ | |
11 | } | 10 |
| |
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.3 |
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 | 1 |
Number of unmapped statements in the second code fragment | 2 |
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(); | |||||||||||||||
8 | if (myClass.isInstance(element)) |
| 26 | if (myClass.isInstance(args)) | ||||||||||||||
9 | if (ascending) | 27 | if (ascending) | |||||||||||||||
10 | elements.addFirst(element); |
| 28 | elements.addFirst(args); | ||||||||||||||
else | else | |||||||||||||||||
11 | elements.add(element); |
| 29 | elements.add(args); |
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.testelement.TestElement of variable element does not match with type org.apache.jmeter.config.Arguments of variable args |
4 | Type org.apache.jmeter.testelement.TestElement of variable element does not match with type org.apache.jmeter.config.Arguments of variable args |
5 | Type org.apache.jmeter.testelement.TestElement of variable element does not match with type org.apache.jmeter.config.Arguments of variable args |