void testResourceCollections() { executeTarget("testResourceCollection"); assertFileExists("junit.jar has been extracted", "unziptestout/junit/framework/Assert.class"); } public void testDocumentationClaimsOnCopy() { executeTarget("testDocumentationClaimsOnCopy"); assertFileMissing("1/foo is excluded", "unziptestout/1/foo"); assertFileExists("2/bar is not excluded", "unziptestout/2/bar"); }
void testEncoding() { executeTarget("encodingTest"); assertFileExists("foo has been properly named", "unziptestout/foo"); } /* * PR 21996 */ public void testFlattenMapper() { executeTarget("testFlattenMapper"); assertFileMissing("1/foo is not flattened", "unziptestout/1/foo"); assertFileExists("foo is flattened", "unziptestout/foo"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/UnzipTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/UnzipTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testResourceCollections() {
1
void testEncoding() {
2
        executeTarget("testResourceCollection");
2
        executeTarget("encodingTest");
3
        assertFileExists("junit.jar has been extracted",
3
        assertFileExists("foo has been 
4
                         "unziptestout/junit/framework/Assert.class");
5
    }
6
    public void testDocumentationClaimsOnCopy
4
properly named", "unziptestout/foo");
5
    }
6
    /*
7
     * PR 21996
8
     */
7
() {
9
    public void testFlattenMapper() {
8
        executeTarget("testDocumentationClaimsOnCopy");
10
        executeTarget("testFlattenMapper");
9
        assertFileMissing("1/foo is excluded", "unziptestout/1/foo");
11
        assertFileMissing("1/foo is not flattened", "unziptestout/1/foo");
10
        assertFileExists("2/bar is not excluded", "unziptestout/2/bar");
12
        assertFileExists("foo is flattened", "unziptestout/foo");
11
    }
13
    }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0