void testDuplicateTextName2() { expectBuildException( "duplicatetextname2", "the attribute name \"text\" has already been used by the text element"); } public void testEscape() { expectLog( "escape", "a@b or a@b is avalue@bvalue"); } public void testAttributeDescription() { expectLog( "attribute.description", "description is hello world"); }
void testXml() { expectOutputContaining( "xml", "<DependsUpon>"); } /** * Test fork * - forked output goes to log */ public void testFork() { expectLogContaining( "fork", "Package: org.apache.tools.ant.util.facade"); } /** * Test fork xml */ public void testForkXml() { expectLogContaining( "fork-xml", "<DependsUpon>"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testDuplicateTextName2() {
1
void testXml() {
2
        expectBuildException(
2
        expect
3
            "duplicatetextname2",
3
OutputContaining(
4
            "xml", "<DependsUpon>");
4
    
5
    }
5
        "the attribute name \"text\" has already been used by the text element");
6
    /**
7
     * Test fork
8
     * - forked output goes to log
6
    }
9
     */
7
    public void testEscape() {
10
    public void testFork() {
8
        expectLog(
11
        expectLogContaining(
9
            "escape",
12
            "fork", "Package: org.apache.tools.ant.util.facade");
10
    
13
    }
11
        "a@b or a@b is avalue@bvalue");
14
    /**
15
     * Test fork xml
12
    }
16
     */
13
    public void testAttributeDescription() {
17
    public void testForkXml() {
14
        expectLog(
18
        expectLogContaining(
15
            "attribute.description",
19
            "
16
            "description is hello world");
20
fork-xml", "<DependsUpon>");
17
    }
21
    }
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