File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java | File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java | |||
Method name: void testMakingUrl2()
|
Method name: void testMakingUrl8()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | HTTPSamplerBase config = new HTTPNullSampler();↵ | 1 | HTTPSamplerBase config = new HTTPNullSampler();↵ | |
2 | config.setProtocol("http");↵ | 2 | config.setProtocol("http");↵ | |
3 | config.setMethod(HTTPSamplerBase.GET);↵ | 3 | config.setMethod(HTTPSamplerBase.GET);↵ | |
4 | config.addArgument("param1", "value1");↵ | 4 | config.parseArguments("param1=");↵ | |
5 | config.setPath("/index.html?p1=p2");↵ | 5 | config.setPath("/index.html");↵ | |
6 | config.setDomain("www.apache.org");↵ | 6 | config.setDomain("www.apache.org");↵ | |
7 | assertEquals("http://www.apache.org/index.html?param1=value1&p1=p2", config.getUrl().toString()); | 7 | assertEquals("http://www.apache.org/index.html?param1=", config.getUrl().toString()); | |
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 | 49 |
Number of mapped statements | 7 |
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 | HTTPSamplerBase config = new HTTPNullSampler(); | 1 | HTTPSamplerBase config = new HTTPNullSampler(); | ||||||||||||||||||||||
2 | config.setProtocol("http"); | 2 | config.setProtocol("http"); | ||||||||||||||||||||||
3 | config.setMethod(HTTPSamplerBase.GET); | 3 | config.setMethod(HTTPSamplerBase.GET); | ||||||||||||||||||||||
4 | config.addArgument("param1", "value1"); |
| 4 | config.parseArguments("param1="); | |||||||||||||||||||||
5 | config.setPath("/index.html?p1=p2"); |
| 5 | config.setPath("/index.html"); | |||||||||||||||||||||
6 | config.setDomain("www.apache.org"); | 6 | config.setDomain("www.apache.org"); | ||||||||||||||||||||||
7 | assertEquals("http://www.apache.org/index.html?param1=value1&p1=p2", config.getUrl().toString()); |
| 7 | assertEquals("http://www.apache.org/index.html?param1=", config.getUrl().toString()); |
Row | Violation |
---|---|
1 | Expression config.addArgument("param1","value1") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression config.parseArguments("param1=") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression config.addArgument("param1","value1") is a void method call, and thus it cannot be parameterized |
4 | Expression config.parseArguments("param1=") is a void method call, and thus it cannot be parameterized |
5 | Expression config.addArgument("param1","value1") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression config.parseArguments("param1=") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression config.addArgument("param1","value1") is a void method call, and thus it cannot be parameterized |
8 | Expression config.parseArguments("param1=") is a void method call, and thus it cannot be parameterized |