File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/functions/TestRegexFunction.java | File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/functions/TestRegexFunction.java | |||
Method name: void testVariableExtraction3()
|
Method name: void testVariableExtraction2()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | params = new LinkedList();↵ | 1 | params = new LinkedList();↵ | |
2 | params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));↵ | 2 | params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));↵ | |
3 | params.add(new CompoundVariable("_$1$"));↵ | 3 | params.add(new CompoundVariable("$1$"));↵ | |
4 | params.add(new CompoundVariable("2"));↵ | 4 | params.add(new CompoundVariable("3"));↵ | |
5 | variable.setParameters(params);↵ | 5 | variable.setParameters(params);↵ | |
6 | String match = variable.execute(result, null);↵ | 6 | String match = variable.execute(result, null);↵ | |
7 | assertEquals("_pinposition2", match); | 7 | assertEquals("pinposition3", match); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 37 |
Number of mapped statements | 7 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | params = new LinkedList(); | 1 | params = new LinkedList(); | |||||||||||
2 | params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>")); | 2 | params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>")); | |||||||||||
3 | params.add(new CompoundVariable("_$1$")); |
| 3 | params.add(new CompoundVariable("$1$")); | ||||||||||
4 | params.add(new CompoundVariable("2")); |
| 4 | params.add(new CompoundVariable("3")); | ||||||||||
5 | variable.setParameters(params); | 5 | variable.setParameters(params); | |||||||||||
6 | String match = variable.execute(result, null); | 6 | String match = variable.execute(result, null); | |||||||||||
7 | assertEquals("_pinposition2", match); |
| 7 | assertEquals("pinposition3", match); |
Row | Violation |
---|