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[] createExpectedOutput(String, String, String, String, String, String, String, byte[])
|
Method name: byte[] createExpectedFormAndUploadOutput(String, String, String, String, String, String, String, File, String, byte[])
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | byte[] formdataMultipart = createExpectedFormdataOutput(boundaryString, contentEncoding, titleField, titleValue, descriptionField, descriptionValue, true, false);↵ | 1 | byte[] formdataMultipart = createExpectedFormdataOutput(boundaryString, contentEncoding, titleField, titleValue, descriptionField, descriptionValue, true, false);↵ | |
2 | byte[] fileMultipart = createExpectedFilepartOutput(boundaryString, fileField, temporaryFile, "text/plain", fileContent, false, true);↵ | 2 | byte[] fileMultipart = createExpectedFilepartOutput(boundaryString, fileField, fileValue, fileMimeType, fileContent, false, true);↵ | |
3 | ↵ | 3 | ↵ | |
4 | // Join the two multiparts↵ | 4 | // Join the two multiparts↵ | |
5 | ByteArrayOutputStream output = new ByteArrayOutputStream();↵ | 5 | ByteArrayOutputStream output = new ByteArrayOutputStream();↵ | |
6 | output.write(formdataMultipart);↵ | 6 | output.write(formdataMultipart);↵ | |
7 | output.write(fileMultipart);↵ | 7 | output.write(fileMultipart);↵ | |
8 | ↵ | 8 | ↵ | |
9 | output.flush();↵ | 9 | output.flush();↵ | |
10 | output.close();↵ | 10 | output.close();↵ | |
11 | ↵ | 11 | ↵ | |
12 | return output.toByteArray(); | 12 |
| |
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 34 |
Number of mapped statements | 8 |
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) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | byte[] formdataMultipart = createExpectedFormdataOutput(boundaryString, contentEncoding, titleField, titleValue, descriptionField, descriptionValue, true, false); | 1 | byte[] formdataMultipart = createExpectedFormdataOutput(boundaryString, contentEncoding, titleField, titleValue, descriptionField, descriptionValue, true, false); | ||||||||||||||
2 | byte[] fileMultipart = createExpectedFilepartOutput(boundaryString, fileField, temporaryFile, "text/plain", fileContent, false, true); |
| 2 | byte[] fileMultipart = createExpectedFilepartOutput(boundaryString, fileField, fileValue, fileMimeType, fileContent, false, true); | |||||||||||||
3 | ByteArrayOutputStream output = new ByteArrayOutputStream(); | 3 | ByteArrayOutputStream output = new ByteArrayOutputStream(); | ||||||||||||||
4 | output.write(formdataMultipart); | 4 | output.write(formdataMultipart); | ||||||||||||||
5 | output.write(fileMultipart); | 5 | output.write(fileMultipart); | ||||||||||||||
6 | output.flush(); | 6 | output.flush(); | ||||||||||||||
7 | output.close(); | 7 | output.close(); | ||||||||||||||
8 | return output.toByteArray(); | 8 | return output.toByteArray(); |
Row | Violation |
---|