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: Collection MakeParams(String, String, String)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 8 | |||
1 | SplitFunction split = new SplitFunction();↵ | |||
2 | Collection parms = new LinkedList();↵ | 1 | Collection parms = new LinkedList();↵ | |
3 | ↵ | 2 | if (p1 != null) {↵ | |
4 | parms.add(new CompoundVariable(p1));↵ | 3 | parms.add(new CompoundVariable(p1));↵ | |
5 | ↵ | 4 | }↵ | |
6 | if (p2 != null) {↵ | 5 | if (p2 != null) {↵ | |
7 | parms.add(new CompoundVariable(p2));↵ | 6 | parms.add(new CompoundVariable(p2));↵ | |
8 | }↵ | 7 | }↵ | |
9 | if (p3 != null) {↵ | 8 | if (p3 != null) {↵ | |
10 | parms.add(new CompoundVariable(p3));↵ | 9 | parms.add(new CompoundVariable(p3));↵ | |
11 | }↵ | 10 | }↵ | |
12 | split.setParameters(parms);↵ | 11 | ↵ | |
13 | return split; | 12 | return parms; | |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 25 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 8.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | SplitFunction split = new SplitFunction(); | | ||||||||||||
2 | Collection parms = new LinkedList(); | 1 | Collection parms = new LinkedList(); | |||||||||||
3 | parms.add(new CompoundVariable(p1)); |
| | |||||||||||
4 | if (p2 != null) | 4 | if (p2 != null) | |||||||||||
5 | parms.add(new CompoundVariable(p2)); | 5 | parms.add(new CompoundVariable(p2)); | |||||||||||
6 | if (p3 != null) |
| 2 | if (p1 != null) | ||||||||||
7 | parms.add(new CompoundVariable(p3)); |
| 3 | parms.add(new CompoundVariable(p1)); | ||||||||||
| 6 | if (p3 != null) | ||||||||||||
| 7 | parms.add(new CompoundVariable(p3)); | ||||||||||||
| 8 | return parms; | ||||||||||||
8 | split.setParameters(parms); | | ||||||||||||
9 | return split; |
| |
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 | Unmatched return split; |