void testDuplicateTextName() { expectBuildException( "duplicatetextname", "the name \"text\" is already used as an attribute"); } public 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 testSimple() { expectOutputContaining( "simple", "Package: org.apache.tools.ant.util.facade"); } /** * Test xml */ public 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 testDuplicateTextName() {
1
void testSimple() {
2
        expectBuildException(
2
        expect
3
            "duplicatetextname",
3
OutputContaining(
4
            "simple", "Package: org.apache.tools.ant.util.facade");
4
    
5
    }
5
        "the name \"text\" is already used as an attribute");
6
    /**
7
     * Test xml
6
    }
8
     */
7
    public void testDuplicateTextName2() {
9
    public void testXml() {
8
        expectBuildException(
10
        expect
9
            "duplicatetextname2",
11
OutputContaining(
12
            "xml", "<DependsUpon>");
10
    
13
    }
11
        "the attribute name \"text\" has already been used by the text element");
14
    /**
15
     * Test fork
16
     * - forked output goes to log
12
    }
17
     */
13
    public void testEscape() {
18
    public void testFork() {
14
        expectLog(
19
        expectLogContaining(
15
            "escape",
20
            "fork", "Package: org.apache.tools.ant.util.facade");
16
    
21
    }
17
        "a@b or a@b is avalue@bvalue");
22
    /**
23
     * Test fork xml
18
    }
24
     */
19
    public void testAttributeDescription() {
25
    public void testForkXml() {
20
        expectLog(
26
        expectLogContaining(
21
            "attribute.description",
27
            "
22
            "description is hello world");
28
fork-xml", "<DependsUpon>");
23
    
29
    
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