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/PostWriterTest.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: 18 | Number of AST nodes: 18 | |||
1 | output.write("Content-Disposition: form-data; name=\"".getBytes(HTTP_ENCODING));↵ | 1 | output.write("Content-Disposition: form-data; name=\"".getBytes(HTTP_ENCODING));↵ | |
2 | output.write(descriptionField.getBytes(HTTP_ENCODING));↵ | 2 | output.write(titleField.getBytes(HTTP_ENCODING));↵ | |
3 | output.write("\"".getBytes(HTTP_ENCODING));↵ | 3 | output.write("\"".getBytes(HTTP_ENCODING));↵ | |
4 | output.write(CRLF);↵ | 4 | output.write(CRLF);↵ | |
5 | output.write("Content-Type: ".getBytes(HTTP_ENCODING));↵ | 5 | output.write("Content-Type: ".getBytes(HTTP_ENCODING));↵ | |
6 | output.write(mimeType.getBytes(HTTP_ENCODING));↵ | 6 | output.write(mimeType.getBytes(HTTP_ENCODING));↵ | |
7 | output.write("; charset=".getBytes(HTTP_ENCODING));↵ | 7 | output.write("; charset=".getBytes(HTTP_ENCODING));↵ | |
8 | output.write((contentEncoding==null ? PostWriter.ENCODING : contentEncoding).getBytes(HTTP_ENCODING));↵ | 8 | output.write((contentEncoding==null ? PostWriter.ENCODING : contentEncoding).getBytes(HTTP_ENCODING));↵ | |
9 | output.write(CRLF);↵ | 9 | output.write(CRLF);↵ | |
10 | output.write("Content-Transfer-Encoding: 8bit".getBytes(HTTP_ENCODING));↵ | 10 | output.write("Content-Transfer-Encoding: 8bit".getBytes(HTTP_ENCODING));↵ | |
11 | output.write(CRLF);↵ | 11 | output.write(CRLF);↵ | |
12 | output.write(CRLF);↵ | 12 | output.write(CRLF);↵ | |
13 | if(contentEncoding != null) {↵ | 13 | if(contentEncoding != null) {↵ | |
14 | output.write(descriptionValue.getBytes(contentEncoding));↵ | 14 | output.write(titleValue.getBytes(contentEncoding));↵ | |
15 | }↵ | 15 | }↵ | |
16 | else {↵ | 16 | else {↵ | |
17 | output.write(descriptionValue.getBytes());↵ | 17 | output.write(titleValue.getBytes());↵ | |
18 | }↵ | 18 | }↵ | |
19 | output.write(CRLF);↵ | 19 | output.write(CRLF);↵ | |
20 | output.write(DASH_DASH);↵ | 20 | output.write(DASH_DASH);↵ | |
21 | output.write(boundaryString.getBytes(HTTP_ENCODING)); | 21 |
| |
See real code fragment | See real code fragment |
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 134 |
Number of mapped statements | 18 |
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) | 25.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
27 | output.write("Content-Disposition: form-data; name=\"".getBytes(HTTP_ENCODING)); | 8 | output.write("Content-Disposition: form-data; name=\"".getBytes(HTTP_ENCODING)); | |||||||||||
28 | output.write(descriptionField.getBytes(HTTP_ENCODING)); |
| 9 | output.write(titleField.getBytes(HTTP_ENCODING)); | ||||||||||
29 | output.write("\"".getBytes(HTTP_ENCODING)); | 10 | output.write("\"".getBytes(HTTP_ENCODING)); | |||||||||||
30 | output.write(CRLF); | 11 | output.write(CRLF); | |||||||||||
31 | output.write("Content-Type: ".getBytes(HTTP_ENCODING)); | 12 | output.write("Content-Type: ".getBytes(HTTP_ENCODING)); | |||||||||||
32 | output.write(mimeType.getBytes(HTTP_ENCODING)); | 13 | output.write(mimeType.getBytes(HTTP_ENCODING)); | |||||||||||
33 | output.write("; charset=".getBytes(HTTP_ENCODING)); | 14 | output.write("; charset=".getBytes(HTTP_ENCODING)); | |||||||||||
34 | output.write((contentEncoding == null ? PostWriter.ENCODING : contentEncoding).getBytes(HTTP_ENCODING)); | 15 | output.write((contentEncoding == null ? PostWriter.ENCODING : contentEncoding).getBytes(HTTP_ENCODING)); | |||||||||||
35 | output.write(CRLF); | 16 | output.write(CRLF); | |||||||||||
36 | output.write("Content-Transfer-Encoding: 8bit".getBytes(HTTP_ENCODING)); | 17 | output.write("Content-Transfer-Encoding: 8bit".getBytes(HTTP_ENCODING)); | |||||||||||
37 | output.write(CRLF); | 18 | output.write(CRLF); | |||||||||||
38 | output.write(CRLF); | 19 | output.write(CRLF); | |||||||||||
39 | if (contentEncoding != null) | 20 | if (contentEncoding != null) | |||||||||||
40 | output.write(descriptionValue.getBytes(contentEncoding)); |
| 21 | output.write(titleValue.getBytes(contentEncoding)); | ||||||||||
else | else | |||||||||||||
41 | output.write(descriptionValue.getBytes()); |
| 22 | output.write(titleValue.getBytes()); | ||||||||||
42 | output.write(CRLF); | 23 | output.write(CRLF); | |||||||||||
43 | output.write(DASH_DASH); | 24 | output.write(DASH_DASH); | |||||||||||
44 | output.write(boundaryString.getBytes(HTTP_ENCODING)); | 25 | output.write(boundaryString.getBytes(HTTP_ENCODING)); |
Row | Violation |
---|