File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/ModuleController.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java | |||
Method name: void setNodePath()
|
Method name: HTTPSampleResult followRedirects(HTTPSampleResult, int)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 3 | |||
1 | if (selectedNode != null) {↵ | |||
2 | TreeNode[] path = selectedNode.getPath();↵ | 1 | SampleResult[] subs = lastRes.getSubResults();↵ | |
3 | for (int i = 0; i < path.length; i++) {↵ | 2 | for (int i = 0; i < subs.length; i++) {↵ | |
4 | nodePath.add(((JMeterTreeNode) path[i]).getName());↵ | 3 | ↵ | |
5 | }↵ | |||
6 | // nodePath.add(selectedNode.getName());↵ | 4 | totalRes.addSubResult(subs[i]);↵ | |
7 | } | 5 | } | |
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 different classes having the same super class |
Number of node comparisons | 6 |
Number of mapped statements | 1 |
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) | 0.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | TreeNode[] path = selectedNode.getPath(); | | ||||||||||||||||
|
| 10 | SampleResult[] subs = lastRes.getSubResults(); | |||||||||||||||
4 | for (int i = 0; i < path.length; i++) |
| 11 | for (int i = 0; i < subs.length; i++) | ||||||||||||||
5 | nodePath.add(((JMeterTreeNode)path[i]).getName()); |
| | |||||||||||||||
|
| 12 | totalRes.addSubResult(subs[i]); |
Row | Violation |
---|---|
1 | Unmatched statement SampleResult[] subs=lastRes.getSubResults(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Type javax.swing.tree.TreeNode[] of variable path does not match with type org.apache.jmeter.samplers.SampleResult[] of variable subs |
3 | Unmatched statement nodePath.add(((JMeterTreeNode)path[i]).getName()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement totalRes.addSubResult(subs[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |