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",c[0].getPath()); assertFalse(c[0].isPathAttributeSpecified()); assertEquals("/sub1",c[1].getPath()); assertTrue(c[1].isPathAttributeSpecified()); assertEquals("/",c[2].getPath()); assertEquals("test1=moo1; test2=moo2; test2=moo3", s);
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",c[0].getPath()); assertFalse(c[0].isPathAttributeSpecified()); assertEquals("/sub1",c[1].getPath()); assertTrue(c[1].isPathAttributeSpecified()); assertEquals("/",c[2].getPath()); assertTrue(c[2].isPathAttributeSpecified());
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 testCookieOrdering2() Method name: void testCookiePolicyNetscape()
Number of AST nodes: 11 Number of AST nodes: 11
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
            assertNotNull(s);
5
            org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url);
5
            org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url);
6
            assertEquals("/sub1",c[0].getPath());
6
            assertEquals("/sub1",c[0].getPath());
7
            assertFalse(c[0].isPathAttributeSpecified());
7
            assertFalse(c[0].isPathAttributeSpecified());
8
            assertEquals("/sub1",c[1].getPath());
8
            assertEquals("/sub1",c[1].getPath());
9
            assertTrue(c[1].isPathAttributeSpecified());
9
            assertTrue(c[1].isPathAttributeSpecified());
10
            assertEquals("/",c[2].getPath());
10
            assertEquals("/",c[2].getPath());
11
            assertEquals("test1=moo1; test2=moo2; test2=moo3", s);
11
            assertTrue(c[2].isPathAttributeSpecified());
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 comparisons121
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements10
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    assertEquals("/sub1", man.get(1).getPath());
    8
    assertEquals("/sub1", man.get(1).getPath());
    8
    assertEquals("/", man.get(2).getPath());
    9
    assertEquals("/", man.get(2).getPath());
    9
    String s = man.getCookieHeaderForURL(url);
    10
    String s = man.getCookieHeaderForURL(url);
    10
    assertNotNull(s);
    11
    assertNotNull(s);
    11
    org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url);
    12
    org.apache.commons.httpclient.Cookie[] c = man.getCookiesForUrl(url);
    12
    assertEquals("/sub1", c[0].getPath());
    13
    assertEquals("/sub1", c[0].getPath());
    13
    assertFalse(c[0].isPathAttributeSpecified());
    14
    assertFalse(c[0].isPathAttributeSpecified());
    14
    assertEquals("/sub1", c[1].getPath());
    15
    assertEquals("/sub1", c[1].getPath());
    15
    assertTrue(c[1].isPathAttributeSpecified());
    16
    assertTrue(c[1].isPathAttributeSpecified());
    16
    assertEquals("/", c[2].getPath());
    17
    assertEquals("/", c[2].getPath());
    17
    assertEquals("test1=moo1; test2=moo2; test2=moo3", s);
    17
    assertEquals("test1=moo1; test2=moo2; test2=moo3", s);
    Preondition Violations
    Unmatched statement assertEquals("test1=moo1; test2=moo2; test2=moo3",s); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                      
                                                                                                    
    18
    assertTrue(c[2].isPathAttributeSpecified());
    Preondition Violations
    Unmatched statement assertTrue(c[2].isPathAttributeSpecified()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    18
    assertTrue(c[2].isPathAttributeSpecified());
    Precondition Violations (3)
    Row Violation
    1Unmatched statement assertEquals("test1=moo1; test2=moo2; test2=moo3",s); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement assertTrue(c[2].isPathAttributeSpecified()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Clone fragment #1 returns variables , while Clone fragment #2 returns variables s