TarFileSet f = (TarFileSet)getInstance(); //check that dir and src are incompatible f.setSrc(new File("example.tar")); try { f.setDir(new File("examples")); fail("can add dir to " + f.getDataTypeName() + " when a src is already present"); } catch (BuildException be) { assertEquals("Cannot set both dir and src attributes",be.getMessage()); } f = (TarFileSet)getInstance(); //check that dir and src are incompatible f.setDir(new File("examples")); try { f.setSrc(new File("example.tar")); fail("can add src to " + f.getDataTypeName() + " when a dir is already present"); } catch (BuildException be) { assertEquals("Cannot set both dir and src attributes",be.getMessage()); } //check that fullpath and prefix are incompatible f = (TarFileSet)getInstance(); f.setSrc(new File("example.tar")); f.setPrefix("/examples"); try { f.setFullpath("/doc/manual/index.html"); fail("Can add fullpath to " + f.getDataTypeName() + " when a prefix is already present"); } catch (BuildException be) { assertEquals("Cannot set both fullpath and prefix attributes", be.getMessage()); } f = (TarFileSet)getInstance(); f.setSrc(new File("example.tar")); f.setFullpath("/doc/manual/index.html"); try { f.setPrefix("/examples"); fail("Can add prefix to " + f.getDataTypeName() + " when a fullpath is already present"); } catch (BuildException be) { assertEquals("Cannot set both fullpath and prefix attributes", be.getMessage()); } // check that reference tarfilesets cannot have specific attributes f = (TarFileSet)getInstance(); f.setRefid(new Reference("test")); try { f.setSrc(new File("example.tar")); fail("Can add src to " + f.getDataTypeName() + " when a refid is already present"); } catch (BuildException be) { assertEquals("You must not specify more than one " + "attribute when using refid", be.getMessage()); } // check that a reference tarfileset gets the same attributes as the original f = (TarFileSet)getInstance(); f.setSrc(new File("example.tar")); f.setPrefix("/examples"); f.setFileMode("600"); f.setDirMode("530"); getProject().addReference("test",f); TarFileSet zid=(TarFileSet)getInstance(); zid.setRefid(new Reference("test")); assertTrue("src attribute copied by copy constructor",zid.getSrc(getProject()).equals(f.getSrc(getProject()))); assertTrue("prefix attribute copied by copy constructor",f.getPrefix(getProject()).equals(zid.getPrefix(getProject()))); assertTrue("file mode attribute copied by copy constructor",f.getFileMode(getProject())==zid.getFileMode(getProject())); assertTrue("dir mode attribute copied by copy constructor",f.getDirMode(getProject())==zid.getDirMode(getProject()));
ZipFileSet f = (ZipFileSet)getInstance(); //check that dir and src are incompatible f.setSrc(new File("example.zip")); try { f.setDir(new File("examples")); fail("can add dir to " + f.getDataTypeName() + " when a src is already present"); } catch (BuildException be) { assertEquals("Cannot set both dir and src attributes",be.getMessage()); } f = (ZipFileSet)getInstance(); //check that dir and src are incompatible f.setDir(new File("examples")); try { f.setSrc(new File("example.zip")); fail("can add src to " + f.getDataTypeName() + " when a dir is already present"); } catch (BuildException be) { assertEquals("Cannot set both dir and src attributes",be.getMessage()); } //check that fullpath and prefix are incompatible f = (ZipFileSet)getInstance(); f.setSrc(new File("example.zip")); f.setPrefix("/examples"); try { f.setFullpath("/doc/manual/index.html"); fail("Can add fullpath to " + f.getDataTypeName() + " when a prefix is already present"); } catch (BuildException be) { assertEquals("Cannot set both fullpath and prefix attributes", be.getMessage()); } f = (ZipFileSet)getInstance(); f.setSrc(new File("example.zip")); f.setFullpath("/doc/manual/index.html"); try { f.setPrefix("/examples"); fail("Can add prefix to " + f.getDataTypeName() + " when a fullpath is already present"); } catch (BuildException be) { assertEquals("Cannot set both fullpath and prefix attributes", be.getMessage()); } // check that reference zipfilesets cannot have specific attributes f = (ZipFileSet)getInstance(); f.setRefid(new Reference("test")); try { f.setSrc(new File("example.zip")); fail("Can add src to " + f.getDataTypeName() + " when a refid is already present"); } catch (BuildException be) { assertEquals("You must not specify more than one " + "attribute when using refid", be.getMessage()); } // check that a reference zipfileset gets the same attributes as the original f = (ZipFileSet)getInstance(); f.setSrc(new File("example.zip")); f.setPrefix("/examples"); f.setFileMode("600"); f.setDirMode("530"); getProject().addReference("test",f); ZipFileSet zid=(ZipFileSet)getInstance(); zid.setRefid(new Reference("test")); assertTrue("src attribute copied by copy constructor",zid.getSrc(getProject()).equals(f.getSrc(getProject()))); assertTrue("prefix attribute copied by copy constructor",f.getPrefix(getProject()).equals(zid.getPrefix(getProject()))); assertTrue("file mode attribute copied by copy constructor",f.getFileMode(getProject())==zid.getFileMode(getProject())); assertTrue("dir mode attribute copied by copy constructor",f.getDirMode(getProject())==zid.getDirMode(getProject()));
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/TarFileSetTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/ZipFileSetTest.java
Method name: void testAttributes() Method name: void testAttributes()
Number of AST nodes: 39 Number of AST nodes: 39
1
TarFileSet f = (TarFileSet)getInstance();
1
ZipFileSet f = (ZipFileSet)getInstance();
2
        //check that dir and src are incompatible
2
        //check that dir and src are incompatible
3
        f.setSrc(new File("example.tar"));
3
        f.setSrc(new File("example.zip"));
4
        try {
4
        try {
5
            f.setDir(new File("examples"));
5
            f.setDir(new File("examples"));
6
            fail("can add dir to "
6
            fail("can add dir to "
7
                    + f.getDataTypeName()
7
                    + f.getDataTypeName()
8
                    + " when a src is already present");
8
                    + " when a src is already present");
9
        } catch (BuildException be) {
9
        } catch (BuildException be) {
10
            assertEquals("Cannot set both dir and src attributes",be.getMessage());
10
            assertEquals("Cannot set both dir and src attributes",be.getMessage());
11
        }
11
        }
12
        f = (TarFileSet)getInstance();
12
        f = (ZipFileSet)getInstance();
13
        //check that dir and src are incompatible
13
        //check that dir and src are incompatible
14
        f.setDir(new File("examples"));
14
        f.setDir(new File("examples"));
15
        try {
15
        try {
16
            f.setSrc(new File("example.tar"));
16
            f.setSrc(new File("example.zip"));
17
            fail("can add src to "
17
            fail("can add src to "
18
                    + f.getDataTypeName()
18
                    + f.getDataTypeName()
19
                    + " when a dir is already present");
19
                    + " when a dir is already present");
20
        } catch (BuildException be) {
20
        } catch (BuildException be) {
21
            assertEquals("Cannot set both dir and src attributes",be.getMessage());
21
            assertEquals("Cannot set both dir and src attributes",be.getMessage());
22
        }
22
        }
23
        //check that fullpath and prefix are incompatible
23
        //check that fullpath and prefix are incompatible
24
        f = (TarFileSet)getInstance();
24
        f = (ZipFileSet)getInstance();
25
        f.setSrc(new File("example.tar"));
25
        f.setSrc(new File("example.zip"));
26
        f.setPrefix("/examples");
26
        f.setPrefix("/examples");
27
        try {
27
        try {
28
            f.setFullpath("/doc/manual/index.html");
28
            f.setFullpath("/doc/manual/index.html");
29
            fail("Can add fullpath to "
29
            fail("Can add fullpath to "
30
                    + f.getDataTypeName()
30
                    + f.getDataTypeName()
31
                    + " when a prefix is already present");
31
                    + " when a prefix is already present");
32
        } catch (BuildException be) {
32
        } catch (BuildException be) {
33
            assertEquals("Cannot set both fullpath and prefix attributes", be.getMessage());
33
            assertEquals("Cannot set both fullpath and prefix attributes", be.getMessage());
34
        }
34
        }
35
        f = (TarFileSet)getInstance();
35
        f = (ZipFileSet)getInstance();
36
        f.setSrc(new File("example.tar"));
36
        f.setSrc(new File("example.zip"));
37
        f.setFullpath("/doc/manual/index.html");
37
        f.setFullpath("/doc/manual/index.html");
38
        try {
38
        try {
39
            f.setPrefix("/examples");
39
            f.setPrefix("/examples");
40
            fail("Can add prefix to "
40
            fail("Can add prefix to "
41
                    + f.getDataTypeName()
41
                    + f.getDataTypeName()
42
                    + " when a fullpath is already present");
42
                    + " when a fullpath is already present");
43
        } catch (BuildException be) {
43
        } catch (BuildException be) {
44
            assertEquals("Cannot set both fullpath and prefix attributes", be.getMessage());
44
            assertEquals("Cannot set both fullpath and prefix attributes", be.getMessage());
45
        }
45
        }
46
        // check that reference tarfilesets cannot have specific attributes
46
        // check that reference zipfilesets cannot have specific attributes
47
        f = (TarFileSet)getInstance();
47
        f = (ZipFileSet)getInstance();
48
        f.setRefid(new Reference("test"));
48
        f.setRefid(new Reference("test"));
49
        try {
49
        try {
50
            f.setSrc(new File("example.tar"));
50
            f.setSrc(new File("example.zip"));
51
            fail("Can add src to "
51
            fail("Can add src to "
52
                    + f.getDataTypeName()
52
                    + f.getDataTypeName()
53
                    + " when a refid is already present");
53
                    + " when a refid is already present");
54
        } catch (BuildException be) {
54
        } catch (BuildException be) {
55
            assertEquals("You must not specify more than one "
55
            assertEquals("You must not specify more than one "
56
            + "attribute when using refid", be.getMessage());
56
            + "attribute when using refid", be.getMessage());
57
        }
57
        }
58
        // check that a reference tarfileset gets the same attributes as the original
58
        // check that a reference zipfileset gets the same attributes as the original
59
        f = (TarFileSet)getInstance();
59
        f = (ZipFileSet)getInstance();
60
        f.setSrc(new File("example.tar"));
60
        f.setSrc(new File("example.zip"));
61
        f.setPrefix("/examples");
61
        f.setPrefix("/examples");
62
        f.setFileMode("600");
62
        f.setFileMode("600");
63
        f.setDirMode("530");
63
        f.setDirMode("530");
64
        getProject().addReference("test",f);
64
        getProject().addReference("test",f);
65
        TarFileSet zid=(TarFileSet)getInstance();
65
        ZipFileSet zid=(ZipFileSet)getInstance();
66
        zid.setRefid(new Reference("test"));
66
        zid.setRefid(new Reference("test"));
67
        assertTrue("src attribute copied by copy constructor",zid.getSrc(getProject()).equals(f.getSrc(getProject())));
67
        assertTrue("src attribute copied by copy constructor",zid.getSrc(getProject()).equals(f.getSrc(getProject())));
68
        assertTrue("prefix attribute copied by copy constructor",f.getPrefix(getProject()).equals(zid.getPrefix(getProject())));
68
        assertTrue("prefix attribute copied by copy constructor",f.getPrefix(getProject()).equals(zid.getPrefix(getProject())));
69
        assertTrue("file mode attribute copied by copy constructor",f.getFileMode(getProject())==zid.getFileMode(getProject()));
69
        assertTrue("file mode attribute copied by copy constructor",f.getFileMode(getProject())==zid.getFileMode(getProject()));
70
        assertTrue("dir mode attribute copied by copy constructor",f.getDirMode(getProject())==zid.getDirMode(getProject()));
70
        assertTrue("dir mode attribute copied by copy constructor",f.getDirMode(getProject())==zid.getDirMode(getProject()));
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)6.5
Clones locationClones are in different classes having the same super class
Number of node comparisons417
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements39
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)320.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    TarFileSet f = (TarFileSet)getInstance();
    1
    TarFileSet f = (TarFileSet)getInstance();
    1
    ZipFileSet f = (ZipFileSet)getInstance();
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    1
    ZipFileSet f = (ZipFileSet)getInstance();
    2
    f.setSrc(new File("example.tar"));
    2
    f.setSrc(new File("example.tar"));
    2
    f.setSrc(new File("example.zip"));
    Differences
    Expression1Expression2Difference
    "example.tar""example.zip"LITERAL_VALUE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    2
    f.setSrc(new File("example.zip"));
    3
    try
    3
    try
    4
    f.setDir(new File("examples"));
    4
    f.setDir(new File("examples"));
    4
    f.setDir(new File("examples"));
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    4
    f.setDir(new File("examples"));
    5
    fail("can add dir to " + f.getDataTypeName() + " when a src is already present");
    5
    fail("can add dir to " + f.getDataTypeName() + " when a src is already present");
    5
    fail("can add dir to " + f.getDataTypeName() + " when a src is already present");
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    5
    fail("can add dir to " + f.getDataTypeName() + " when a src is already present");
    6
    f = (TarFileSet)getInstance();
    6
    f = (TarFileSet)getInstance();
    6
    f = (ZipFileSet)getInstance();
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    6
    f = (ZipFileSet)getInstance();
    7
    f.setDir(new File("examples"));
    7
    f.setDir(new File("examples"));
    7
    f.setDir(new File("examples"));
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    7
    f.setDir(new File("examples"));
    8
    try
    8
    try
    9
    f.setSrc(new File("example.tar"));
    9
    f.setSrc(new File("example.tar"));
    9
    f.setSrc(new File("example.zip"));
    Differences
    Expression1Expression2Difference
    "example.tar""example.zip"LITERAL_VALUE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    9
    f.setSrc(new File("example.zip"));
    10
    fail("can add src to " + f.getDataTypeName() + " when a dir is already present");
    10
    fail("can add src to " + f.getDataTypeName() + " when a dir is already present");
    10
    fail("can add src to " + f.getDataTypeName() + " when a dir is already present");
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    10
    fail("can add src to " + f.getDataTypeName() + " when a dir is already present");
    11
    f = (TarFileSet)getInstance();
    11
    f = (TarFileSet)getInstance();
    11
    f = (ZipFileSet)getInstance();
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    11
    f = (ZipFileSet)getInstance();
    12
    f.setSrc(new File("example.tar"));
    12
    f.setSrc(new File("example.tar"));
    12
    f.setSrc(new File("example.zip"));
    Differences
    Expression1Expression2Difference
    "example.tar""example.zip"LITERAL_VALUE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    12
    f.setSrc(new File("example.zip"));
    13
    f.setPrefix("/examples");
    13
    f.setPrefix("/examples");
    13
    f.setPrefix("/examples");
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    13
    f.setPrefix("/examples");
    14
    try
    14
    try
    15
    f.setFullpath("/doc/manual/index.html");
    15
    f.setFullpath("/doc/manual/index.html");
    15
    f.setFullpath("/doc/manual/index.html");
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    15
    f.setFullpath("/doc/manual/index.html");
    16
    fail("Can add fullpath to " + f.getDataTypeName() + " when a prefix is already present");
    16
    fail("Can add fullpath to " + f.getDataTypeName() + " when a prefix is already present");
    16
    fail("Can add fullpath to " + f.getDataTypeName() + " when a prefix is already present");
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    16
    fail("Can add fullpath to " + f.getDataTypeName() + " when a prefix is already present");
    17
    f = (TarFileSet)getInstance();
    17
    f = (TarFileSet)getInstance();
    17
    f = (ZipFileSet)getInstance();
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    17
    f = (ZipFileSet)getInstance();
    18
    f.setSrc(new File("example.tar"));
    18
    f.setSrc(new File("example.tar"));
    18
    f.setSrc(new File("example.zip"));
    Differences
    Expression1Expression2Difference
    "example.tar""example.zip"LITERAL_VALUE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    18
    f.setSrc(new File("example.zip"));
    19
    f.setFullpath("/doc/manual/index.html");
    19
    f.setFullpath("/doc/manual/index.html");
    19
    f.setFullpath("/doc/manual/index.html");
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    19
    f.setFullpath("/doc/manual/index.html");
    20
    try
    20
    try
    21
    f.setPrefix("/examples");
    21
    f.setPrefix("/examples");
    21
    f.setPrefix("/examples");
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    21
    f.setPrefix("/examples");
    22
    fail("Can add prefix to " + f.getDataTypeName() + " when a fullpath is already present");
    22
    fail("Can add prefix to " + f.getDataTypeName() + " when a fullpath is already present");
    22
    fail("Can add prefix to " + f.getDataTypeName() + " when a fullpath is already present");
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    22
    fail("Can add prefix to " + f.getDataTypeName() + " when a fullpath is already present");
    23
    f = (TarFileSet)getInstance();
    23
    f = (TarFileSet)getInstance();
    23
    f = (ZipFileSet)getInstance();
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    23
    f = (ZipFileSet)getInstance();
    24
    f.setRefid(new Reference("test"));
    24
    f.setRefid(new Reference("test"));
    24
    f.setRefid(new Reference("test"));
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    24
    f.setRefid(new Reference("test"));
    25
    try
    25
    try
    26
    f.setSrc(new File("example.tar"));
    26
    f.setSrc(new File("example.tar"));
    26
    f.setSrc(new File("example.zip"));
    Differences
    Expression1Expression2Difference
    "example.tar""example.zip"LITERAL_VALUE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    26
    f.setSrc(new File("example.zip"));
    27
    fail("Can add src to " + f.getDataTypeName() + " when a refid is already present");
    27
    fail("Can add src to " + f.getDataTypeName() + " when a refid is already present");
    27
    fail("Can add src to " + f.getDataTypeName() + " when a refid is already present");
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    27
    fail("Can add src to " + f.getDataTypeName() + " when a refid is already present");
    28
    f = (TarFileSet)getInstance();
    28
    f = (TarFileSet)getInstance();
    28
    f = (ZipFileSet)getInstance();
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    28
    f = (ZipFileSet)getInstance();
    29
    f.setSrc(new File("example.tar"));
    29
    f.setSrc(new File("example.tar"));
    29
    f.setSrc(new File("example.zip"));
    Differences
    Expression1Expression2Difference
    "example.tar""example.zip"LITERAL_VALUE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    29
    f.setSrc(new File("example.zip"));
    30
    f.setPrefix("/examples");
    30
    f.setPrefix("/examples");
    30
    f.setPrefix("/examples");
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    30
    f.setPrefix("/examples");
    31
    f.setFileMode("600");
    31
    f.setFileMode("600");
    31
    f.setFileMode("600");
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    31
    f.setFileMode("600");
    32
    f.setDirMode("530");
    32
    f.setDirMode("530");
    32
    f.setDirMode("530");
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    32
    f.setDirMode("530");
    33
    getProject().addReference("test", f);
    33
    getProject().addReference("test", f);
    33
    getProject().addReference("test", f);
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    33
    getProject().addReference("test", f);
    34
    TarFileSet zid = (TarFileSet)getInstance();
    34
    TarFileSet zid = (TarFileSet)getInstance();
    34
    ZipFileSet zid = (ZipFileSet)getInstance();
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    34
    ZipFileSet zid = (ZipFileSet)getInstance();
    35
    zid.setRefid(new Reference("test"));
    35
    zid.setRefid(new Reference("test"));
    35
    zid.setRefid(new Reference("test"));
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    35
    zid.setRefid(new Reference("test"));
    36
    assertTrue("src attribute copied by copy constructor", zid.getSrc(getProject()).equals(f.getSrc(getProject())));
    36
    assertTrue("src attribute copied by copy constructor", zid.getSrc(getProject()).equals(f.getSrc(getProject())));
    36
    assertTrue("src attribute copied by copy constructor", zid.getSrc(getProject()).equals(f.getSrc(getProject())));
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    36
    assertTrue("src attribute copied by copy constructor", zid.getSrc(getProject()).equals(f.getSrc(getProject())));
    37
    assertTrue("prefix attribute copied by copy constructor", f.getPrefix(getProject()).equals(zid.getPrefix(getProject())));
    37
    assertTrue("prefix attribute copied by copy constructor", f.getPrefix(getProject()).equals(zid.getPrefix(getProject())));
    37
    assertTrue("prefix attribute copied by copy constructor", f.getPrefix(getProject()).equals(zid.getPrefix(getProject())));
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    37
    assertTrue("prefix attribute copied by copy constructor", f.getPrefix(getProject()).equals(zid.getPrefix(getProject())));
    38
    assertTrue("file mode attribute copied by copy constructor", f.getFileMode(getProject()) == zid.getFileMode(getProject()));
    38
    assertTrue("file mode attribute copied by copy constructor", f.getFileMode(getProject()) == zid.getFileMode(getProject()));
    38
    assertTrue("file mode attribute copied by copy constructor", f.getFileMode(getProject()) == zid.getFileMode(getProject()));
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    38
    assertTrue("file mode attribute copied by copy constructor", f.getFileMode(getProject()) == zid.getFileMode(getProject()));
    39
    assertTrue("dir mode attribute copied by copy constructor", f.getDirMode(getProject()) == zid.getDirMode(getProject()));
    39
    assertTrue("dir mode attribute copied by copy constructor", f.getDirMode(getProject()) == zid.getDirMode(getProject()));
    39
    assertTrue("dir mode attribute copied by copy constructor", f.getDirMode(getProject()) == zid.getDirMode(getProject()));
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.TarFileSetorg.apache.tools.ant.types.ZipFileSetSUBCLASS_TYPE_MISMATCH
    39
    assertTrue("dir mode attribute copied by copy constructor", f.getDirMode(getProject()) == zid.getDirMode(getProject()));
    Precondition Violations (0)
    Row Violation