void testOverrideDefault() { expectLog( "override.default", "value is new"); } public void testImplicit() { expectLog( "implicit", "Before implicitIn implicitAfter implicit"); } public void testImplicitNotOptional() { expectSpecificBuildException( "implicit.notoptional", "Missing nested elements for implicit element implicit", "Missing nested elements for implicit element implicit");
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/MacroDefTest.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 testOverrideDefault() {
1
void test
2
        expectLog(
3
            "override.default",
4
            "value is new");
2
NoSourcefileDefined() {
3
        expectBuildException("testNoSourcefileDefined",
4
                "source file not defined");
5
    }
6
    /**
7
     * A unit test for JUnit
5
    }
8
     */
6
    public void testImplicit() {
9
    public void testNoPropertyDefined() {
7
        expectLog(
10
        expect
8
            "implicit", "Before implicitIn implicitAfter implicit");
11
BuildException("testNoPropertyDefined",
12
                "output property not defined");
13
    }
14
    /**
15
     * A unit test for JUnit
9
    }
16
     */
10
    public void testImplicitNotOptional() {
17
    public void testNoSourcefilefound() {
11
        expectSpecificBuildException(
18
        expectBuildException
12
            "implicit.notoptional",
13
            "Missing nested elements for implicit element implicit",
14
            "Missing nested elements for implicit element implici
19
Containing("testNoSourcefilefound",
15
t");
20
                "File not found", " doesn't exist");
16
    
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