File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java | File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java | |||
Method name: void testCookiePolicyIgnore()
|
Method name: void testCookiePolicyNetscape()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | assertEquals(3,man.getCookieCount());↵ | 1 | assertEquals(3,man.getCookieCount());↵ | |
2 | assertEquals("/sub1",man.get(0).getPath());↵ | 2 | assertEquals("/sub1",man.get(0).getPath());↵ | |
3 | assertEquals("/sub1",man.get(1).getPath());↵ | 3 | assertEquals("/sub1",man.get(1).getPath());↵ | |
4 | assertEquals("/",man.get(2).getPath());↵ | 4 | assertEquals("/",man.get(2).getPath());↵ | |
5 | String s = man.getCookieHeaderForURL(url);↵ | 5 | String s = man.getCookieHeaderForURL(url);↵ | |
6 | assertNull(s);↵ | 6 | assertNotNull(s);↵ | |
7 | org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url); | 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.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 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14 | assertEquals(3, man.getCookieCount()); | 6 | assertEquals(3, man.getCookieCount()); | |||||||||||||||
15 | assertEquals("/sub1", man.get(0).getPath()); | 7 | assertEquals("/sub1", man.get(0).getPath()); | |||||||||||||||
16 | assertEquals("/sub1", man.get(1).getPath()); | 8 | assertEquals("/sub1", man.get(1).getPath()); | |||||||||||||||
17 | assertEquals("/", man.get(2).getPath()); | 9 | assertEquals("/", man.get(2).getPath()); | |||||||||||||||
18 | String s = man.getCookieHeaderForURL(url); | 10 | String s = man.getCookieHeaderForURL(url); | |||||||||||||||
19 | assertNull(s); |
| 11 | assertNotNull(s); | ||||||||||||||
20 | org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url); | 12 | org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url); |
Row | Violation |
---|---|
1 | Expression assertNull(s) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression assertNotNull(s) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression assertNull(s) is a void method call, and thus it cannot be parameterized |
4 | Expression assertNotNull(s) is a void method call, and thus it cannot be parameterized |
5 | Clone fragment #1 returns variables c , while Clone fragment #2 returns variables c, s |