CopyfileTest(String name) { super(name); } public 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"); }
LoadFileTest(String name) { super(name); } /** * The JUnit setup method */ public 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"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/CopyfileTest.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
CopyfileTest(String name) {
1
LoadFileTest(String name) {
2
        super(name);
2
        super(name);
3
    }
3
    }
4
    /**
5
     * The JUnit setup method
6
     */
4
    public void setUp() {
7
    public void setUp() {
5
        configureProject("src/etc/testcases/taskdefs/copyfile.xml");
8
        configureProject("src/etc/testcases/taskdefs/loadfile.xml");
6
    }
9
    }
10
    /**
11
     * The teardown method for JUnit
12
     */
7
    public void tearDown() {
13
    public void tearDown() {
8
        executeTarget("cleanup");
14
        executeTarget("cleanup");
9
    }
15
    }
16
    /**
17
     * A unit test for JUnit
18
     */
10
    public void test1() {
19
    public void testNoSourcefileDefined() {
11
        expectBuildException("test1", "required argument not speci
20
        expectBuildException("testNoSourcefileDefined",
12
fied");
21
                "source file not defined");
13
    }
22
    }
14
    public void test2() {
23
    
15
        expectBuildException("test2", "required argument not speci
24
/**
25
     * A unit test for JUnit
26
     */
27
    public void testNoPropertyDefined() {
28
        expectBuildException("testNoPropertyDefined",
16
fied");
29
                "output property not defined");
17
    }
30
    }
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