File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/MenuFactory.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/MenuFactory.java | |||
Method name: boolean canAddTo(JMeterTreeNode, JMeterTreeNode[])
|
Method name: boolean canAddTo(JMeterTreeNode, JMeterTreeNode[])
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (parent instanceof Sampler) {// Samplers and Controllers need not apply ...↵ | 1 | if (parent instanceof ↵ | |
2 | if (foundClass(nodes, new Class[]{Sampler.class, Controller.class})↵ | 2 | TestPlan) {↵ | |
3 | if (foundClass(nodes, ↵ | |||
4 | new Class[]{Sampler.class, Controller.class}, // Samplers and Controllers need not apply ...↵ | |||
5 | org.apache.jmeter.threads.ThreadGroup.class) // but ThreadGroup (Controller) is OK↵ | |||
3 | ){↵ | 6 | ){↵ | |
4 | return false;↵ | 7 | return false;↵ | |
5 | }↵ | 8 | }↵ | |
6 | return true;↵ | 9 | return true;↵ | |
7 | } | 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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 5 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19 | if (foundClass(nodes, new Class[] {Sampler.class, Controller.class})) |
| 11 | if (foundClass(nodes, new Class[] {Sampler.class, Controller.class}, org.apache.jmeter.threads.ThreadGroup.class)) | ||||||||||
20 | return false; |
| 12 | return false; |
Row | Violation |
---|---|
1 | Conditional return false; |
2 | Conditional return false; |