void test23() { executeTarget("test23"); assertEquals("true", project.getProperty("test")); } // Class is found in specified classpath public void test24() { executeTarget("test24"); assertEquals("true", project.getProperty("test")); } // File is not found in specified filepath public void testSearchInPathNotThere() { executeTarget("searchInPathNotThere"); assertNull(project.getProperty("test"));
void test9() { executeTarget("test9"); assertEquals("true", project.getProperty("test")); } // All three specified and all three exist -> true public void test10() { executeTarget("test10"); assertEquals("true", project.getProperty("test")); } // All three specified but class missing -> null public void test11() { executeTarget("test11"); assertNull(project.getProperty("test"));
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/AvailableTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/AvailableTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void test23() {
1
void test9() {
2
        executeTarget("test23");
2
        executeTarget("test9");
3
        assertEquals("true", project.getProperty("test"));
3
        assertEquals("true", project.getProperty("test"));
4
    }
4
    }
5
    // Class is found in specified classpath
5
    // All three specified and all three exist -> true
6
    public void test24() {
6
    public void test10() {
7
        executeTarget("test24");
7
        executeTarget("test10");
8
        assertEquals("true", project.getProperty("test"));
8
        assertEquals("true", project.getProperty("test"));
9
    }
9
    }
10
    // File is not found in specified filepath
10
    // All three specified but class missing -> null
11
    public void testSearchInPathNotThere() {
11
    public void test11() {
12
        executeTarget("searchInPathNotThere");
12
        executeTarget("test11");
13
        assertNull(project.getProperty("test"));
13
        assertNull(project.getProperty("test"));
14
    
14
    
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