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(titleField.getBytes(HTTP_ENCODING));↵ | 2 | output.write(descriptionField.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(titleValue.getBytes(contentEncoding));↵ | 14 | output.write(descriptionValue.getBytes(contentEncoding));↵ | |
15 | }↵ | 15 | }↵ | |
16 | else {↵ | 16 | else {↵ | |
17 | output.write(titleValue.getBytes());↵ | 17 | output.write(descriptionValue.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.4 |
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) | 37.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | output.write("Content-Disposition: form-data; name=\"".getBytes(HTTP_ENCODING)); | 27 | output.write("Content-Disposition: form-data; name=\"".getBytes(HTTP_ENCODING)); | |||||||||||
9 | output.write(titleField.getBytes(HTTP_ENCODING)); |
| 28 | output.write(descriptionField.getBytes(HTTP_ENCODING)); | ||||||||||
10 | output.write("\"".getBytes(HTTP_ENCODING)); | 29 | output.write("\"".getBytes(HTTP_ENCODING)); | |||||||||||
11 | output.write(CRLF); | 30 | output.write(CRLF); | |||||||||||
12 | output.write("Content-Type: ".getBytes(HTTP_ENCODING)); | 31 | output.write("Content-Type: ".getBytes(HTTP_ENCODING)); | |||||||||||
13 | output.write(mimeType.getBytes(HTTP_ENCODING)); | 32 | output.write(mimeType.getBytes(HTTP_ENCODING)); | |||||||||||
14 | output.write("; charset=".getBytes(HTTP_ENCODING)); | 33 | output.write("; charset=".getBytes(HTTP_ENCODING)); | |||||||||||
15 | output.write((contentEncoding == null ? PostWriter.ENCODING : contentEncoding).getBytes(HTTP_ENCODING)); | 34 | output.write((contentEncoding == null ? PostWriter.ENCODING : contentEncoding).getBytes(HTTP_ENCODING)); | |||||||||||
16 | output.write(CRLF); | 35 | output.write(CRLF); | |||||||||||
17 | output.write("Content-Transfer-Encoding: 8bit".getBytes(HTTP_ENCODING)); | 36 | output.write("Content-Transfer-Encoding: 8bit".getBytes(HTTP_ENCODING)); | |||||||||||
18 | output.write(CRLF); | 37 | output.write(CRLF); | |||||||||||
19 | output.write(CRLF); | 38 | output.write(CRLF); | |||||||||||
20 | if (contentEncoding != null) | 39 | if (contentEncoding != null) | |||||||||||
21 | output.write(titleValue.getBytes(contentEncoding)); |
| 40 | output.write(descriptionValue.getBytes(contentEncoding)); | ||||||||||
else | else | |||||||||||||
22 | output.write(titleValue.getBytes()); |
| 41 | output.write(descriptionValue.getBytes()); | ||||||||||
23 | output.write(CRLF); | 42 | output.write(CRLF); | |||||||||||
24 | output.write(DASH_DASH); | 43 | output.write(DASH_DASH); | |||||||||||
25 | output.write(boundaryString.getBytes(HTTP_ENCODING)); | 44 | output.write(boundaryString.getBytes(HTTP_ENCODING)); |
Row | Violation |
---|