void setUp() { configureProject("src/etc/testcases/taskdefs/loadfile.xml"); } /** * The teardown method for JUnit */ public void tearDown() { executeTarget("cleanup"); } /** * A unit test for JUnit */ public void testNoSourcefileDefined() { expectBuildException("testNoSourcefileDefined", "source file not defined"); } /** * A unit test for JUnit */ public void testNoPropertyDefined() { expectBuildException("testNoPropertyDefined", "output property not defined");
void setUp() { configureProject("src/etc/testcases/taskdefs/copyfile.xml"); } public void tearDown() { executeTarget("cleanup"); } public void test1() { expectBuildException("test1", "required argument not specified"); } public void test2() { expectBuildException("test2", "required argument not specified");
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/CopyfileTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void setUp() {
1
void setUp() {
2
        configureProject("src/etc/testcases/taskdefs/loadfile.xml");
2
        configureProject("src/etc/testcases/taskdefs/copyfile.xml");
3
    }
3
    }
4
    /**
5
     * The teardown method for JUnit
6
     */
7
    public void tearDown() {
4
    public void tearDown() {
8
        executeTarget("cleanup");
5
        executeTarget("cleanup");
9
    }
6
    }
10
    /**
11
     * A unit test for JUnit
12
     */
13
    public void testNoSourcefileDefined() {
7
    public void test1() {
14
        expectBuildException("testNoSourcefileDefined",
8
        expectBuildException("test
15
                "source file not defined");
9
1", "required argument not specified");
16
    }
10
    }
17
    /**
18
     * A unit test for JUnit
19
     */
20
    public void testNoPropertyDefined() {
11
    public void test2() {
21
        expectBuildException("testNoPropertyDefined",
12
        expectBuildException("test
22
                "output property not defined");
13
2", "required argument not specified");
23
    
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