void testTextElement() { expectLogContaining( "textelement", "Hello world"); } public void testTextTrim() { expectLogContaining( "text.trim", "[Hello world]"); } public void testDuplicateTextName() { expectBuildException( "duplicatetextname", "the name \"text\" is already used as an attribute");
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"); } public void testUri() { expectLog("uri", "Hello World");
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/MacroDefTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testTextElement() {
1
void testDuplicateAttribute() {
2
        expectLogContaining(
2
        expectBuildException(
3
            "textelement", "Hello world");
3
            "
4
    }
5
    public void testTextTrim() {
6
        expectLogContaining(
7
            "text.trim", "[Hello world]
4
duplicate.attribute",
8
");
5
            "the attribute text has already been specified");
9
    }
6
    }
10
    public void testDuplicateTextName() {
7
    public void testDuplicateElement() {
11
        expectBuildException(
8
        expectBuildException(
12
            "duplicatetextname",
9
            "duplicate.element",
13
            "the name \"text\" is already used as an attribute
10
            "the element text has already been specified");
11
    }
12
    public void testUri() {
14
");
13
        expectLog("uri", "Hello World");
15
    
14
    
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