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: void testSendPostData_NoFilename()
|
Method name: void testSendFormData_Urlencoded()
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | String titleValue = "mytitle";↵ | 1 | String titleValue = "mytitle";↵ | |
2 | String descriptionValue = "mydescription";↵ | 2 | String descriptionValue = "mydescription";↵ | |
3 | setupFormData(sampler, titleValue, descriptionValue);↵ | 3 | setupFormData(sampler, titleValue, descriptionValue);↵ | |
4 | // Test sending data with default encoding↵ | 4 | // Test sending data with default encoding↵ | |
5 | String contentEncoding = "";↵ | 5 | String contentEncoding = "";↵ | |
6 | sampler.setContentEncoding(contentEncoding); ↵ | 6 | sampler.setContentEncoding(contentEncoding); ↵ | |
7 | postWriter.setHeaders(connection, sampler);↵ | 7 | postWriter.setHeaders(connection, sampler);↵ | |
8 | postWriter.sendPostData(connection, sampler);↵ | 8 | postWriter.sendPostData(connection, sampler);↵ | |
9 | ↵ | 9 | ↵ | |
10 | checkContentTypeUrlEncoded(connection); | 10 |
| |
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 declared in the same class |
Number of node comparisons | 64 |
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 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
2 | String titleValue = "mytitle"; | 1 | String titleValue = "mytitle"; | |
3 | String descriptionValue = "mydescription"; | 2 | String descriptionValue = "mydescription"; | |
4 | setupFormData(sampler, titleValue, descriptionValue); | 3 | setupFormData(sampler, titleValue, descriptionValue); | |
5 | String contentEncoding = ""; | 4 | String contentEncoding = ""; | |
6 | sampler.setContentEncoding(contentEncoding); | 5 | sampler.setContentEncoding(contentEncoding); | |
7 | postWriter.setHeaders(connection, sampler); | 6 | postWriter.setHeaders(connection, sampler); | |
8 | postWriter.sendPostData(connection, sampler); | 7 | postWriter.sendPostData(connection, sampler); | |
9 | checkContentTypeUrlEncoded(connection); | 8 | checkContentTypeUrlEncoded(connection); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables contentEncoding , while Clone fragment #2 returns variables titleValue, descriptionValue, contentEncoding |