public class NiceTest extends BuildFileTest { public NiceTest(String name) { super(name); } public void setUp() { configureProject("src/etc/testcases/taskdefs/nice.xml"); } public void testNoop() { executeTarget("noop"); } public void testCurrent() { executeTarget("current"); } public void testFaster() { executeTarget("faster"); } public void testSlower() { executeTarget("slower"); } public void testTooSlow() { expectBuildExceptionContaining( "too_slow","out of range","out of the range 1-10"); } public void testTooFast() { expectBuildExceptionContaining( "too_fast", "out of range", "out of the range 1-10");
public class PvcsTest extends BuildFileTest { public PvcsTest(String name) { super(name); } public void setUp() { configureProject("src/etc/testcases/taskdefs/optional/pvcs.xml"); } public void test1() { expectBuildException("test1", "Required argument repository not specified"); } public void test2() { executeTarget("test2"); } public void test3() { executeTarget("test3"); } public void test4() { executeTarget("test4"); } public void test5() { executeTarget("test5"); } public void test6() { expectBuildException("test6", "Failed executing: /never/heard/of/a/directory/structure/like/this/pcli lvf -z -aw -pr//ct4serv2/pvcs/monitor /. Exception: /never/heard/of/a/directory/structure/like/this/pcli: not found");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/NiceTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/PvcsTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class NiceTest extends BuildFileTest {
1
public class PvcsTest extends BuildFileTest {
2
    public NiceTest(String name) {
2
    public PvcsTest(String name) {
3
        super(name);
3
        super(name);
4
    }
4
    }
5
    public void setUp() {
5
    public void setUp() {
6
        configureProject("src/etc/testcases/taskdefs/nice.xml");
6
        configureProject("src/etc/testcases/taskdefs/optional/pvcs.xml");
7
    }
7
    }
8
    public void testNoop() {
8
    public void test1() {
9
        executeTarget("noop");
9
        expectBuildException("test1", "Required argument repository not specified");
10
    }
10
    }
11
    public void testCurrent() {
11
    public void test2() {
12
        executeTarget("current");
12
        executeTarget("test2");
13
    }
13
    }
14
    public void testFaster() {
14
    public void test3() {
15
        executeTarget("faster");
15
        executeTarget("test3");
16
    }
16
    }
17
    public void testSlower() {
17
    public void test4() {
18
        executeTarget("slower");
18
        executeTarget("test4");
19
    }
19
    }
20
    public void testTooSlow() {
20
    public void test5() {
21
        expectBuildExceptionContaining(
21
        exec
22
                "too_slow","out of range","out of the range 1-10");
22
uteTarget("test5");
23
    }
23
    }
24
    public void testTooFast() {
24
    public void test6() {
25
        expectBuildExceptionContaining(
25
        expectBuildException
26
                "too_fast", "out of range", "out of the range 1-10");
26
("test6", "Failed executing: /never/heard/of/a/directory/structure/like/this/pcli lvf -z -aw -pr//ct4serv2/pvcs/monitor /. Exception: /never/heard/of/a/directory/structure/like/this/pcli: not found");
27
    
27
    
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