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 testDuplicateCookie()
|
Method name: void testCookieOrdering1()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 8 | |||
1 | URL url = new URL("http://a.b.c/");↵ | 1 | URL url = new URL("http://order.now/sub1/moo.html");↵ | |
2 | man.addCookieFromHeader("test=1", url);↵ | 2 | man.addCookieFromHeader("test1=moo1;path=/", url);↵ | |
3 | String s = man.getCookieHeaderForURL(url);↵ | 3 | man.addCookieFromHeader↵ | |
4 | assertNotNull(s↵ | 4 | ("test2=moo2;path=/sub1", url);↵ | |
5 | );↵ | 5 | man.addCookieFromHeader("test2=moo3;path=/", url);↵ | |
6 | assertEquals("test=1", s);↵ | 6 | assertEquals(↵ | |
7 | man.addCookieFromHeader("test=2", url);↵ | 7 | 3,man.getCookieCount());↵ | |
8 | s = man.getCookieHeaderForURL(url);↵ | 8 | String s = man.getCookieHeaderForURL(url);↵ | |
9 | assertNotNull(s);↵ | 9 | assertNotNull(s);↵ | |
10 | assertEquals("test=2", s); | 10 | assertEquals("test2=moo2; test1=moo1; test2=moo3", s); | |
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 | 57 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | URL url = new URL("http://a.b.c/"); |
| 1 | URL url = new URL("http://order.now/sub1/moo.html"); | ||||||||||||||||||||||||
2 | man.addCookieFromHeader("test=1", url); |
| 2 | man.addCookieFromHeader("test1=moo1;path=/", url); | ||||||||||||||||||||||||
3 | String s = man.getCookieHeaderForURL(url); | 6 | String s = man.getCookieHeaderForURL(url); | |||||||||||||||||||||||||
4 | assertNotNull(s); |
| 4 | man.addCookieFromHeader("test2=moo3;path=/", url); | ||||||||||||||||||||||||
5 | assertEquals("test=1", s); |
| 8 | assertEquals("test2=moo2; test1=moo1; test2=moo3", s); | ||||||||||||||||||||||||
6 | man.addCookieFromHeader("test=2", url); |
| 3 | man.addCookieFromHeader("test2=moo2;path=/sub1", url); | ||||||||||||||||||||||||
7 | s = man.getCookieHeaderForURL(url); |
| | |||||||||||||||||||||||||
8 | assertNotNull(s); |
| 5 | assertEquals(3, man.getCookieCount()); | ||||||||||||||||||||||||
9 | assertEquals("test=2", s); |
| 7 | assertNotNull(s); |
Row | Violation |
---|---|
1 | Expression assertNotNull(s) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression man.addCookieFromHeader("test2=moo3;path=/",url) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression assertNotNull(s) is a void method call, and thus it cannot be parameterized |
4 | Expression man.addCookieFromHeader("test2=moo3;path=/",url) is a void method call, and thus it cannot be parameterized |
5 | Expression assertNotNull(s) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression man.addCookieFromHeader("test2=moo3;path=/",url) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression assertNotNull(s) is a void method call, and thus it cannot be parameterized |
8 | Expression man.addCookieFromHeader("test2=moo3;path=/",url) is a void method call, and thus it cannot be parameterized |
9 | Unmatched statement s=man.getCookieHeaderForURL(url); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
10 | Expression assertNotNull(s) is a void method call, and thus it cannot be parameterized |
11 | Expression assertEquals(3,man.getCookieCount()) is a void method call, and thus it cannot be parameterized |
12 | Expression assertNotNull(s) is a void method call, and thus it cannot be parameterized |
13 | Expression assertEquals(3,man.getCookieCount()) is a void method call, and thus it cannot be parameterized |
14 | Expression assertNotNull(s) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression assertEquals("test=2",s) is a void method call, and thus it cannot be parameterized |
16 | Expression assertNotNull(s) is a void method call, and thus it cannot be parameterized |
17 | Expression assertNotNull(s) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression assertEquals("test=2",s) is a void method call, and thus it cannot be parameterized |
19 | Expression assertNotNull(s) is a void method call, and thus it cannot be parameterized |
20 | Clone fragment #1 returns variables url, s , while Clone fragment #2 returns variables |