void testPass() { executeTarget("testPass"); } public void testFail() { expectBuildExceptionContaining("testFail", "must fail", "${foo}=bar"); } public void testEmpty() { expectBuildExceptionContaining("testEmpty", "must fail", "No nested XML specified");
void testReferences() { expectAssertion("test-references"); } public void testMultipleAssertions() { expectBuildExceptionContaining("test-multiple-assertions", "multiple assertions rejected", "Only one assertion declaration is allowed"); } public void testReferenceAbuse() { expectBuildExceptionContaining("test-reference-abuse", "reference abuse rejected", "You must not specify");
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/types/AssertionsTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testPass() {
1
void testReferences() {
2
        executeTarget("testPass");
2
        expectAssertion("test-references");
3
    }
3
    }
4
    public void testFail() {
4
    public void testMultipleAssertions() {
5
        expectBuildExceptionContaining("testFail", "must fail", "${foo}=bar
5
        expectBuildExceptionContaining("test-multiple-assertions",
6
                "multiple assertions rejected",
6
");
7
                "Only one assertion declaration is allowed");
7
    }
8
    }
8
    public void testEmpty() {
9
    public void testReferenceAbuse() {
9
        expectBuildExceptionContaining("testEmpty", "must fail", "No nested XML
10
        expectBuildExceptionContaining("test-reference-abuse",
11
                "reference abuse rejected",
10
 specified");
12
                "You must not specify");
11
    
13
    
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