public class EchoXMLTest extends BuildFileTest { public EchoXMLTest(String name) { super(name); } public void setUp() { configureProject("src/etc/testcases/taskdefs/echoxml.xml"); } public void tearDown() { executeTarget("tearDown"); } public void testPass() { executeTarget("testPass"); } public void testFail() { expectBuildExceptionContaining("testFail", "must fail", "${foo}=bar"); } public void testEmpty() { expectBuildExceptionContaining("testEmpty", "must fail", "No nested XML specified");
public class IsSignedTest extends BuildFileTest { public IsSignedTest(String name) { super(name); } public void setUp() { configureProject("src/etc/testcases/taskdefs/conditions/issigned.xml"); } public void testPass() { executeTarget("pass"); } public void testPassword() { executeTarget("password"); } public void testAPassword() { executeTarget("apassword"); } public void testAllSigned() { executeTarget("allsigned");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/EchoXMLTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/condition/IsSignedTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class EchoXMLTest extends BuildFileTest {
1
public class IsSignedTest extends BuildFileTest {
2
    public EchoXMLTest(String name) {
2
    public IsSignedTest(String name) {
3
        super(name);
3
        super(name);
4
    }
4
    }
5
    public void setUp() {
5
    public void setUp() {
6
        configureProject("src/etc/testcases/taskdefs/echoxml.xml");
6
        configureProject("src/etc/testcases/taskdefs/conditions/issigned.xml");
7
    }
7
    }
8
    public void tearDown() {
8
    public void testPass() {
9
        executeTarget("tearDown");
9
        executeTarget("pass");
10
    }
10
    }
11
    public void testPass() {
11
    public void testPassword() {
12
        executeTarget("testPass");
12
        executeTarget("password");
13
    }
13
    }
14
    public void testFail() {
14
    public void testAPassword() {
15
        expectBuildExceptionContaining("testFail", "must fail", "${foo}=bar");
15
        executeTarget("apassword");
16
    }
16
    }
17
    public void testEmpty() {
17
    public void testAllSigned() {
18
        expectBuildExceptionContaining("testEmpty", "must fail", "No nested XML specified");
18
        executeTarget("allsigned");
19
    
19
    
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