void testTransferParameterEmpty() throws Exception { expectFileContains("testTransferParameterEmpty", "out/out.xml", "empty=''"); } public void testTransferParameterUnset() throws Exception { expectFileContains("testTransferParameterUnset", "out/out.xml", "undefined='${value}'"); } public void testTransferParameterUnsetWithIf() throws Exception { expectFileContains("testTransferParameterUnsetWithIf", "out/out.xml", "undefined='undefined default value'"); }
void test9() { expectBuildExceptionContaining("test9", "Construction is invalid - Name attribute should not be used", "Specify the section name using the \"name\" attribute of the <section> element"); } /** * Inline manifest - Invalid attribute without name */ public void test10() { expectBuildExceptionContaining("test10", "Attribute has no name", "Attributes must have name and value"); } /** * Inline manifest - Invalid attribute without value */ public void test11() { expectBuildExceptionContaining("test11", "Attribute has no value", "Attributes must have name and value"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/StyleTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/ManifestTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testTransferParameterEmpty() throws Exception {
1
void test9() {
2
        expectFileContains("testTransferParameterEmpty",
2
        expectBuildExceptionContaining("test
3
 
3
9", "Construction is invalid - Name attribute should not be used",
4
                          "out/out.xml",
4
                          
5
                           "empty=''");
6
    }
7
    public void testTransferParameterUnset() throws Exception
5
             "Specify the section name using the \"name\" attribute of the <section> element");
6
    }
7
    /**
8
     * Inline manifest - Invalid attribute without name
9
     */
8
 {
10
    public void test10() {
9
        expectFileContains("testTransferParameterUnset",
11
        expectBuildExceptionContaining("test10", "Attribute has no name",
10
                           "out/out.xml",
12
                           
11
                           "undefined='${value}'");
13
            "Attributes must have name and value");
14
    }
15
    /**
16
     * Inline manifest - Invalid attribute without value
12
    }
17
    
18
 */
13
    public void testTransferParameterUnsetWithIf() throws Exception {
19
    public void test11() {
14
        expectFileContains("testTransferParameterUnsetWithIf",
20
        expectBuildExceptionContaining("test
15
                           "out/out.xml",
16
                           "undefined='undefined default
21
11", "Attribute has no value",
17
 value'");
22
                                       "Attributes must have name and value");
18
    }
23
    }
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