boolean haveContentEncoding = false;
if(contentEncoding != null && contentEncoding.trim().length() > 0) {
put.getParams().setContentCharset(contentEncoding);
haveContentEncoding = true;
}
boolean haveContentEncoding = false;
if(contentEncoding != null && contentEncoding.trim().length() > 0) {
post.getParams().setContentCharset(contentEncoding);
haveContentEncoding = true;
}
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 sendPutData(PutMethod)
|
|
Method name: String sendPostData(PostMethod)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | boolean haveContentEncoding = false;↵ | | 1 | boolean haveContentEncoding = false;↵
|
2 | if(contentEncoding != null && contentEncoding.trim().length() > 0) {↵ | | 2 | if(contentEncoding != null && contentEncoding.trim().length() > 0) {↵
|
3 | put.getParams().setContentCharset(contentEncoding);↵ | | 3 | post.getParams().setContentCharset(contentEncoding);↵
|
4 | haveContentEncoding = true;↵ | | 4 | haveContentEncoding = true;↵
|
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 1.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
14 | boolean haveContentEncoding = false; | | 53 | boolean haveContentEncoding = false; |
15 | if (contentEncoding != null && contentEncoding.trim().length() > 0) | | 54 | if (contentEncoding != null && contentEncoding.trim().length() > 0) |
16 | put.getParams().setContentCharset(contentEncoding); | | 55 | post.getParams().setContentCharset(contentEncoding); |
17 | haveContentEncoding = true; | | 56 | haveContentEncoding = true; |
Precondition Violations (0)
Row |
Violation |