for(int i = 0; i < partNo; i++) {
if(parts[i] instanceof ViewableFilePart) {
((ViewableFilePart) parts[i]).setHideFileData(false);
}
}
for(int i = 0; i < partNo; i++) {
if(parts[i] instanceof ViewableFilePart) {
((ViewableFilePart) parts[i]).setHideFileData(true); // .sendMultipartWithoutFileContent(bos);
}
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
|
Method name: String sendPostData(PostMethod)
|
|
Method name: String sendPostData(PostMethod)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | for(int i = 0; i < partNo; i++) {↵ | | 1 | for(int i = 0; i < partNo; i++) {↵
|
2 | if(parts[i] instanceof ViewableFilePart) {↵ | | 2 | if(parts[i] instanceof ViewableFilePart) {↵
|
3 | ((ViewableFilePart) parts[i]).setHideFileData(false);↵ | | 3 | ((ViewableFilePart) parts[i]).setHideFileData(true); // .sendMultipartWithoutFileContent(bos);↵
|
4 | }↵ | | 4 | }↵
|
5 | } | | 5 | }
|
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 5.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
37 | for (int i = 0; i < partNo; i++) | | 29 | for (int i = 0; i < partNo; i++) |
38 | if (parts[i] instanceof ViewableFilePart) | | 30 | if (parts[i] instanceof ViewableFilePart) |
39 | ((ViewableFilePart)parts[i]).setHideFileData(false); | | 31 | ((ViewableFilePart)parts[i]).setHideFileData(true); |
Precondition Violations (0)
Row |
Violation |