void testNoSourcefileDefined() { expectBuildException("testNoSourcefileDefined", "source file not defined"); } /** * A unit test for JUnit */ public void testNoPropertyDefined() { expectBuildException("testNoPropertyDefined", "output property not defined"); } /** * A unit test for JUnit */ public void testNoSourcefilefound() { expectBuildExceptionContaining("testNoSourcefilefound", "File not found", " doesn't exist"); }
void testXmlnsFile() { expectLog("xmlns.file", "MyTask called"); } public void testCore() { expectLog("core", "MyTask called"); } public void testExcluded() { expectBuildExceptionContaining( "excluded", "excluded uri", "Attempt to use a reserved URI ant:notallowed"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/LoadFileTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/XmlnsTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testNoSourcefileDefined() {
1
void test
2
        expectBuildException("testNoSourcefileDefined",
3
                "source file not defin
2
XmlnsFile() {
4
ed");
3
        expectLog("xmlns.file", "MyTask called");
5
    }
4
    }
6
    /**
5
    
7
     * A unit test for JUnit
8
     */
9
    public void testNoPropertyDefined() {
10
        expectBuildException("testNoPropertyDefined",
11
                "output property not defined");
12
    }
13
    /**
14
     * A unit test for JUnit
15
     */
6
public void testCore() {
7
        expectLog("core", "MyTask called");
8
    }
16
    public void testNoSourcefilefound() {
9
    public void testExcluded() {
17
        expectBuildExceptionContaining("testNoSourcefilefound
10
        expectBuildExceptionContaining(
18
",
11
            "excluded", "excluded uri",
19
                "File not found", " doesn't exist");
12
            "Attempt to use a reserved URI ant:notallowed");
20
    }
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