for (int idx=0; idx < text.length; idx++) {
if (idx > 0) {
cat.append(CLASSPATH_SEPARATOR);
}
cat.append(text[idx]);
}
if (sleep > 0) {
Thread.sleep(sleep);
}
results.setSuccessful(success);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/TestPlan.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/test/JavaTest.java
|
Method name: void setTestPlanClasspathArray(String[])
|
|
Method name: SampleResult runTest(JavaSamplerContext)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | for (int idx=0; idx < text.length; idx++) {↵ | | |
|
2 | if (idx > 0) {↵ | | |
|
3 | cat.append(CLASSPATH_SEPARATOR);↵ | | |
|
4 | }↵ | | |
|
5 | cat.append(text[idx]);↵ | | |
|
6 | } | | 1 | if (sleep > 0) {↵
|
| | | 2 | Thread.sleep(sleep);↵
|
| | | 3 | }↵
|
| | | 4 | results.setSuccessful(success);
|
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 |
Number of node comparisons | 6 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.5 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | if (idx > 0) | | 17 | if (sleep > 0) |
4 | cat.append(CLASSPATH_SEPARATOR); | | | |
| | | 18 | |
5 | cat.append(text[idx]); | | | |
Precondition Violations (1)
Row |
Violation |
1 | Type int of variable idx does not match with type long of variable sleep |