void testNestedB() { expectLogContaining("nested.b", "add B called"); } public void testNestedC() { expectLogContaining("nested.c", "add C called"); } public void testNestedAB() { expectBuildExceptionContaining( "nested.ab", "Should have got ambiguous", "ambiguous");
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/types/AddTypeTest.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 testNestedB() {
1
void testNoSourcefileDefined() {
2
        expectLogContaining("nested.b", "add B called");
2
        expectBuildException("test
3
    }
3
NoSourcefileDefined",
4
                "source file not defined");
5
    }
6
    /**
7
     * A unit test for JUnit
8
     */
4
    public void testNestedC() {
9
    public void testNoPropertyDefined() {
5
        expectLogContaining("nested.c", "add C called");
10
        expectBuildException("test
6
    }
11
NoPropertyDefined",
12
                "output property not defined");
13
    }
14
    /**
15
     * A unit test for JUnit
16
     */
7
    public void testNestedAB() {
17
    public void testNoSourcefilefound() {
8
        expectBuildExceptionContaining(
18
        expectBuildExceptionContaining(
9
            "nested.ab", "Should hav
19
"testNoSourcefilefound",
10
e got ambiguous", "ambiguous");
20
                "File not found", " doesn't exist");
11
    
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