void testSimple() { expectLog("simple", "Hello World"); } public void testText() { expectLog("text", "Inner Text"); } public void testDuplicateAttribute() { expectBuildException( "duplicate.attribute", "the attribute text has already been specified"); } public void testDuplicateElement() { expectBuildException( "duplicate.element", "the element text has already been specified"); }
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 testSimple() {
1
void testSimple() {
2
        expectLog("simple", "Hello World");
2
        expect
3
    }
3
OutputContaining(
4
            "simple", "Package: org.apache.tools.ant.util.facade");
5
    }
6
    /**
7
     * Test xml
8
     */
4
    public void testText() {
9
    public void testXml() {
5
        expectLog("text", "Inner Text");
10
        expect
6
    }
7
    public void testDuplicateAttribute
11
OutputContaining(
12
            "xml", "<DependsUpon>");
13
    }
14
    /**
15
     * Test fork
16
     * - forked output goes to log
17
     */
8
() {
18
    public void testFork() {
9
        expectBuildException(
19
        expectLogContaining(
10
            "duplicate.attribute",
20
            "fork", "Package: org.apache.tools.ant.util.facade");
11
    
21
    }
12
        "the attribute text has already been specified");
22
    /**
23
     * Test fork xml
13
    }
24
    
25
 */
14
    public void testDuplicateElement() {
26
    public void testForkXml() {
15
        expectBuildException(
27
        expectLogContaining(
16
            "duplicate.element",
28
            "
17
            "the element text has already been specified");
29
fork-xml", "<DependsUpon>");
18
    }
30
    }
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