assertEquals(3,man.getCookieCount()); assertEquals("/sub1",man.get(0).getPath()); 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(3,man.getCookieCount()); assertEquals("/sub1",man.get(0).getPath()); 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 testCookiePolicyNetscape() Method name: void testCookiePolicyIgnore()
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
            assertNotNull(s);
6
            assertNull(s);
7
            org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url);
7
            org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons49
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    assertEquals(3, man.getCookieCount());
    14
    assertEquals(3, man.getCookieCount());
    7
    assertEquals("/sub1", man.get(0).getPath());
    15
    assertEquals("/sub1", man.get(0).getPath());
    8
    assertEquals("/sub1", man.get(1).getPath());
    16
    assertEquals("/sub1", man.get(1).getPath());
    9
    assertEquals("/", man.get(2).getPath());
    17
    assertEquals("/", man.get(2).getPath());
    10
    String s = man.getCookieHeaderForURL(url);
    18
    String s = man.getCookieHeaderForURL(url);
    11
    assertNotNull(s);
    11
    assertNotNull(s);
    19
    assertNull(s);
    Differences
    Expression1Expression2Difference
    assertNotNullassertNullMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression assertNotNull(s) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertNull(s) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertNotNull(s) is a void method call, and thus it cannot be parameterized
    Expression assertNull(s) is a void method call, and thus it cannot be parameterized
    19
    assertNull(s);
    12
    org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url);
    20
    org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url);
    Precondition Violations (5)
    Row Violation
    1Expression assertNotNull(s) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression assertNull(s) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression assertNotNull(s) is a void method call, and thus it cannot be parameterized
    4Expression assertNull(s) is a void method call, and thus it cannot be parameterized
    5Clone fragment #1 returns variables c, s , while Clone fragment #2 returns variables c