if (emptyList()) {
reInitialize();
resetLoopCount();
return null;
}
return super.next();
if (isFirst()) { // Set the selection once per iteration
current = getSelectionAsInt();
}
return super.next();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/ForeachController.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/SwitchController.java
|
Method name: Sampler next()
|
|
Method name: Sampler next()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 3
|
|
1 | if (emptyList()) {↵ | | 1 | if (↵
|
2 | reInitialize();↵ | | |
|
3 | resetLoopCount();↵ | | |
|
4 | return null↵ | | 2 | isFirst()) { // Set the selection once per iteration↵
|
5 | ;↵ | | 3 | current = getSelectionAsInt();↵
|
6 | }↵ | | 4 | }↵
|
7 | return super.next(); | | 5 | return super.next();
|
See real code fragment |
|
See real code fragment |
Summary
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (emptyList()) | | 1 | if (isFirst()) |
| | | 2 | current = getSelectionAsInt(); |
2 | | | | |
3 | | | | |
4 | | | | |
5 | return super.next(); | | 3 | return super.next(); |
Precondition Violations (1)
Row |
Violation |
1 | Unmatched return null; |