assertEquals("/sub1",man.get(1).getPath());
assertEquals("/",man.get(2).getPath());
String s = man.getCookieHeaderForURL(url);
assertNotNull(s);
org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url);
assertEquals("/sub1",man.get(1).getPath());
assertEquals("/",man.get(2).getPath());
String s = man.getCookieHeaderForURL(url);
assertNull(s);
org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url);
Clone fragments detected by clone detection tool
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 testCookiePolicy2109()
|
|
Method name: void testCookiePolicyIgnore()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | assertEquals("/sub1",man.get(1).getPath());↵ | | 1 | assertEquals("/sub1",man.get(1).getPath());↵
|
2 | assertEquals("/",man.get(2).getPath());↵ | | 2 | assertEquals("/",man.get(2).getPath());↵
|
3 | String s = man.getCookieHeaderForURL(url);↵ | | 3 | String s = man.getCookieHeaderForURL(url);↵
|
4 | assertNotNull(s);↵ | | 4 | assertNull(s);↵
|
5 | org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url); | | 5 | org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url);
|
See real code fragment |
|
See real code fragment |
Summary
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 | 25 |
-
{Non-refactorable}
Mapping Summary
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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
7 | assertEquals("/sub1", man.get(1).getPath()); | | 16 | assertEquals("/sub1", man.get(1).getPath()); |
8 | assertEquals("/", man.get(2).getPath()); | | 17 | assertEquals("/", man.get(2).getPath()); |
9 | String s = man.getCookieHeaderForURL(url); | | 18 | String s = man.getCookieHeaderForURL(url); |
10 | assertNotNull(s); | | 19 | assertNull(s); |
11 | org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url); | | 20 | org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url); |
Precondition Violations (5)
Row |
Violation |
1 | Expression assertNotNull(s) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression assertNull(s) 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 assertNull(s) is a void method call, and thus it cannot be parameterized |
5 | Clone fragment #1 returns variables c, s , while Clone fragment #2 returns variables c |