reInitialize();
if (endOfLoop()) {
resetLoopCount();
return null;
}
return next();
reInitialize();
if (endOfArguments()) {
// setDone(true);
resetLoopCount();
return null;
}
return next();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/RunTime.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/ForeachController.java
|
Method name: Sampler nextIsNull()
|
|
Method name: Sampler nextIsNull()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | reInitialize();↵ | | 1 | reInitialize();↵
|
2 | if (endOfLoop()) {↵ | | 2 | if (endOfArguments()) {↵
|
| | | 3 | // setDone(true);↵
|
3 | resetLoopCount();↵ | | 4 | resetLoopCount();↵
|
4 | return null;↵ | | 5 | return null;↵
|
5 | }↵ | | 6 | }↵
|
6 | return next(); | | 7 | return 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 | 13 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | reInitialize(); | | 1 | reInitialize(); |
2 | if (endOfLoop()) | | 2 | if (endOfArguments()) |
3 | | | 3 | |
4 | | | 4 | |
5 | return next(); | | 5 | return next(); |
Precondition Violations (1)
Row |
Violation |
1 | Expression endOfArguments() cannot be parameterized, because it has dependencies to/from statements that will be extracted |