File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/extractor/RegexExtractor.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/functions/RegexFunction.java | |||
Method name: String generateResult(MatchResult)
|
Method name: String generateResult(MatchResult, String, Object[], JMeterVariables)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | for (int a = 0; a < template.length; a++) {↵ | 1 | for (int a = 0; a < template.length; a++) {↵ | |
2 | log.debug("RegexExtractor: Template piece #" + a + " = " + template[a]);↵ | 2 | ↵ | |
3 | if (template[a] instanceof String) {↵ | 3 | if (template[a] instanceof String) {↵ | |
4 | result.append(template[a]);↵ | 4 | result.append(template[a]);↵ | |
5 | } else {↵ | 5 | } else {↵ | |
6 | result.append(match.group(((Integer) template[a]).intValue()));↵ | 6 | result.append(match.group(((Integer) template[a]).intValue()));↵ | |
7 | }↵ | 7 | }↵ | |
8 | } | 8 |
| |
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 |
Number of node comparisons | 11 |
Number of mapped statements | 4 |
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) | 1.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
2 | for (int a = 0; a < template.length; a++) | 3 | for (int a = 0; a < template.length; a++) | ||||
3 | log.debug("RegexExtractor: Template piece #" + a + " = " + template[a]); |
| | ||||
4 | if (template[a] instanceof String) | 4 | if (template[a] instanceof String) | ||||
5 | result.append(template[a]); | 5 | result.append(template[a]); | ||||
else | else | ||||||
6 | result.append(match.group(((Integer)template[a]).intValue())); | 6 | result.append(match.group(((Integer)template[a]).intValue())); |
Row | Violation |
---|---|
1 | Unmatched statement log.debug("RegexExtractor: Template piece #" + a + " = "+ template[a]); 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 a , while Clone fragment #2 returns variables |