File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/functions/PackageTest.java | File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/functions/PackageTest.java | |||
Method name: SplitFunction SplitParams(String, String, String)
|
Method name: CSVRead setCSVReadParams(String, String)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 8 | |||
1 | SplitFunction split = new SplitFunction();↵ | 1 | CSVRead cr = new CSVRead();↵ | |
2 | Collection parms = new LinkedList();↵ | 2 | Collection parms = new LinkedList();↵ | |
3 | parms.add(new CompoundVariable(p1));↵ | 3 | if (p1 != null) {↵ | |
4 | parms.add(new CompoundVariable(p1));↵ | |||
5 | }↵ | |||
4 | if (p2 != null) {↵ | 6 | if (p2 != null) {↵ | |
5 | parms.add(new CompoundVariable(p2));↵ | 7 | parms.add(new CompoundVariable(p2));↵ | |
6 | }↵ | 8 | }↵ | |
7 | if (p3 != null) {↵ | 9 | ↵ | |
8 | parms.add(new CompoundVariable(p3));↵ | |||
9 | }↵ | |||
10 | split.setParameters(parms);↵ | 10 | cr.setParameters(parms);↵ | |
11 | return split; | 11 | return cr; | |
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 declared in the same class |
Number of node comparisons | 23 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 8.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | SplitFunction split = new SplitFunction(); |
| 1 | CSVRead cr = new CSVRead(); | |||||||||||||||||||
2 | Collection parms = new LinkedList(); | 2 | Collection parms = new LinkedList(); | ||||||||||||||||||||
3 | parms.add(new CompoundVariable(p1)); |
| | ||||||||||||||||||||
4 | if (p2 != null) | 5 | if (p2 != null) | ||||||||||||||||||||
5 | parms.add(new CompoundVariable(p2)); | 6 | parms.add(new CompoundVariable(p2)); | ||||||||||||||||||||
6 | if (p3 != null) |
| 3 | if (p1 != null) | |||||||||||||||||||
7 | parms.add(new CompoundVariable(p3)); |
| 4 | parms.add(new CompoundVariable(p1)); | |||||||||||||||||||
8 | split.setParameters(parms); |
| 7 | cr.setParameters(parms); | |||||||||||||||||||
9 | return split; |
| 8 | return cr; |
Row | Violation |
---|---|
1 | Unmatched statement parms.add(new CompoundVariable(p1)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Clone fragment #1 returns variables parms , while Clone fragment #2 returns variables |