File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java | File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java | |||
Method name: byte[] createExpectedFormdataOutput(String, String, String, String, String, String, boolean, boolean)
|
Method name: byte[] createExpectedFormdataOutput(String, String, String, String, String, String, boolean, boolean)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | output.write(CRLF);↵ | 1 | output.write(CRLF);↵ | |
2 | output.write("Content-Transfer-Encoding: 8bit".getBytes(HTTP_ENCODING));↵ | 2 | output.write("Content-Transfer-Encoding: 8bit".getBytes(ISO_8859_1));↵ | |
3 | output.write(CRLF);↵ | 3 | output.write(CRLF);↵ | |
4 | output.write(CRLF);↵ | 4 | output.write(CRLF);↵ | |
5 | if(contentEncoding != null) {↵ | 5 | if(contentEncoding != null) {↵ | |
6 | output.write(descriptionValue.getBytes(contentEncoding));↵ | 6 | output.write(descriptionValue.getBytes(contentEncoding));↵ | |
7 | }↵ | 7 | }↵ | |
8 | else {↵ | 8 | else {↵ | |
9 | output.write(descriptionValue.getBytes());↵ | 9 | output.write(descriptionValue.getBytes());↵ | |
10 | }↵ | 10 | }↵ | |
11 | output.write(CRLF);↵ | 11 | output.write(CRLF);↵ | |
12 | output.write(DASH_DASH);↵ | 12 | output.write(DASH_DASH);↵ | |
13 | output.write(boundaryString.getBytes(HTTP_ENCODING));↵ | 13 | output.write(boundaryString.getBytes(ISO_8859_1));↵ | |
14 | if(lastMultipart) {↵ | 14 | if(lastMultipart) {↵ | |
15 | output.write(DASH_DASH);↵ | 15 | output.write(DASH_DASH);↵ | |
16 | }↵ | 16 | }↵ | |
17 | output.write(CRLF);↵ | 17 | output.write(CRLF);↵ | |
18 | ↵ | 18 | ↵ | |
19 | output.flush();↵ | 19 | output.flush();↵ | |
20 | output.close();↵ | 20 | output.close();↵ | |
21 | return output.toByteArray(); | 21 |
| |
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 87 |
Number of mapped statements | 16 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 9.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35 | output.write(CRLF); | 34 | output.write(CRLF); | |||||||||||
36 | output.write("Content-Transfer-Encoding: 8bit".getBytes(HTTP_ENCODING)); |
| 35 | output.write("Content-Transfer-Encoding: 8bit".getBytes(ISO_8859_1)); | ||||||||||
|
| 36 | output.write(CRLF); | |||||||||||
37 | output.write(CRLF); | 37 | output.write(CRLF); | |||||||||||
38 | output.write(CRLF); | 37 | output.write(CRLF); | |||||||||||
39 | if (contentEncoding != null) | 38 | if (contentEncoding != null) | |||||||||||
40 | output.write(descriptionValue.getBytes(contentEncoding)); | 39 | output.write(descriptionValue.getBytes(contentEncoding)); | |||||||||||
else | else | |||||||||||||
41 | output.write(descriptionValue.getBytes()); | 40 | output.write(descriptionValue.getBytes()); | |||||||||||
42 | output.write(CRLF); | 41 | output.write(CRLF); | |||||||||||
43 | output.write(DASH_DASH); | 42 | output.write(DASH_DASH); | |||||||||||
44 | output.write(boundaryString.getBytes(HTTP_ENCODING)); |
| 43 | output.write(boundaryString.getBytes(ISO_8859_1)); | ||||||||||
45 | if (lastMultipart) | 44 | if (lastMultipart) | |||||||||||
46 | output.write(DASH_DASH); | 45 | output.write(DASH_DASH); | |||||||||||
47 | output.write(CRLF); | 46 | output.write(CRLF); | |||||||||||
48 | output.flush(); | 47 | output.flush(); | |||||||||||
49 | output.close(); | 48 | output.close(); | |||||||||||
50 | return output.toByteArray(); | 49 | return output.toByteArray(); |
Row | Violation |
---|---|
1 | Unmatched statement output.write(CRLF); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |