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