if (startsWith) {
if (matchExists) {
combined.add(new Integer(matcher.getMatch().group(1)));
}
combined.add(iter.next());
} else {
combined.add(iter.next());
if (matchExists) {
combined.add(new Integer(matcher.getMatch().group(1)));
}
}
if (startsWith) {
if (matchExists) {
combined.add(new Integer(matcher.getMatch().group(1)));
}
combined.add(iter.next());
} else {
combined.add(iter.next());
if (matchExists) {
combined.add(new Integer(matcher.getMatch().group(1)));
}
}
Clone fragments detected by clone detection tool
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: void initTemplate()
|
|
Method name: Object[] generateTemplate(String)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | if (startsWith) {↵ | | 1 | if (startsWith) {↵
|
2 | if (matchExists) {↵ | | 2 | if (matchExists) {↵
|
3 | combined.add(new Integer(matcher.getMatch().group(1)));↵ | | 3 | combined.add(new Integer(matcher.getMatch().group(1)));↵
|
4 | }↵ | | 4 | }↵
|
5 | combined.add(iter.next());↵ | | 5 | combined.add(iter.next());↵
|
6 | } else {↵ | | 6 | } else {↵
|
7 | combined.add(iter.next());↵ | | 7 | combined.add(iter.next());↵
|
8 | if (matchExists) {↵ | | 8 | if (matchExists) {↵
|
9 | combined.add(new Integer(matcher.getMatch().group(1)));↵ | | 9 | combined.add(new Integer(matcher.getMatch().group(1)));↵
|
10 | }↵ | | 10 | }↵
|
11 | } | | 11 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 17 |
-
{Refactorable}
Mapping Summary
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) | 84.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
19 | if (startsWith) | | 10 | if (startsWith) |
20 | | | 15 | |
21 | combined.add(new Integer(matcher.getMatch().group(1))); | | 16 | combined.add(new Integer(matcher.getMatch().group(1))); |
22 | combined.add(iter.next()); | | 14 | combined.add(iter.next()); |
| | | | |
23 | combined.add(iter.next()); | | 13 | combined.add(iter.next()); |
24 | | | 11 | |
25 | combined.add(new Integer(matcher.getMatch().group(1))); | | 12 | combined.add(new Integer(matcher.getMatch().group(1))); |
Precondition Violations (0)
Row |
Violation |