File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/PostWriter.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java | |||
Method name: void setHeaders(URLConnection, HTTPSampler)
|
Method name: String sendPutData(PutMethod)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 3 | |||
1 | HTTPFileArg file = files.length > 0? files[0] : null;↵ | 1 | HTTPFileArg file = files.length > 0? files[0] : null;↵ | |
2 | if(file != null && file.getMimeType() != null && file.getMimeType().length() > 0) {↵ | 2 | if(file != null && file.getMimeType() != null && file.getMimeType().length() > 0) {↵ | |
3 | connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE, file.getMimeType()); | 3 | put.setRequestHeader(HEADER_CONTENT_TYPE, file.getMimeType());↵ | |
4 |
| |||
See real code fragment | See real code fragment |
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
59 | HTTPFileArg file = files.length > 0 ? files[0] : null; | 41 | HTTPFileArg file = files.length > 0 ? files[0] : null; | ||||
60 | if (file != null && file.getMimeType() != null && file.getMimeType().length() > 0) | 42 | if (file != null && file.getMimeType() != null && file.getMimeType().length() > 0) | ||||
|
| 43 | put.setRequestHeader(HEADER_CONTENT_TYPE, file.getMimeType()); | ||||
61 | connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE, file.getMimeType()); |
| |
Row | Violation |
---|---|
1 | Unmatched statement put.setRequestHeader(HEADER_CONTENT_TYPE,file.getMimeType()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE,file.getMimeType()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |