File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java | File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java | |||
Method name: void checkPostRequestFormMultipart(HTTPSamplerBase, HTTPSampleResult, String, String, String, String, String, String)
|
Method name: void checkPostRequestFileUpload(HTTPSamplerBase, HTTPSampleResult, String, String, String, String, String, String, String, File, String, byte[])
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if(contentEncoding == null || contentEncoding.length() == 0) {↵ | 1 | if(contentEncoding == null || contentEncoding.length() == 0) {↵ | |
2 | contentEncoding = samplerDefaultEncoding;↵ | 2 | contentEncoding = samplerDefaultEncoding;↵ | |
3 | }↵ | 3 | }↵ | |
4 | // Check URL↵ | 4 | // Check URL↵ | |
5 | assertEquals(sampler.getUrl(), res.getURL());↵ | 5 | assertEquals(sampler.getUrl(), res.getURL());↵ | |
6 | String boundaryString = getBoundaryStringFromContentType(res.getRequestHeaders());↵ | 6 | String boundaryString = getBoundaryStringFromContentType(res.getRequestHeaders());↵ | |
7 | assertNotNull(boundaryString); | 7 |
| |
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 declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
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) | 1.2 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | if (contentEncoding == null || contentEncoding.length() == 0) | 1 | if (contentEncoding == null || contentEncoding.length() == 0) | |
2 | contentEncoding = samplerDefaultEncoding; | 2 | contentEncoding = samplerDefaultEncoding; | |
3 | assertEquals(sampler.getUrl(), res.getURL()); | 3 | assertEquals(sampler.getUrl(), res.getURL()); | |
4 | String boundaryString = getBoundaryStringFromContentType(res.getRequestHeaders()); | 4 | String boundaryString = getBoundaryStringFromContentType(res.getRequestHeaders()); | |
5 | assertNotNull(boundaryString); | 5 | assertNotNull(boundaryString); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables contentEncoding, boundaryString , while Clone fragment #2 returns variables contentEncoding, boundaryString |