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'"); } public void testNewerStylesheet() throws Exception { expectFileContains("testNewerStylesheet", "out/out.xml", "new-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 testTransferParameterUnset() throws Exception {
1
void test9() {
2
        expectFileContains("testTransferParameterUnset",
2
        expectBuildExceptionContaining("test9", "Construction is invalid - Name attribute should not be used",
3
                           "out/out.xml",
3
                           
4
                           "undefined='${value}'");
5
    }
6
    public void testTransferParameterUnsetWithIf() throws Exception
4
            "Specify the section name using the \"name\" attribute of the <section> element");
5
    }
6
    /**
7
     * Inline manifest - Invalid attribute without name
8
     */
7
 {
9
    public void test10() {
8
        expectFileContains("testTransferParameterUnsetWithIf",
10
        expectBuildExceptionContaining("test10", "Attribute has no name",
9
                           "out/out.xml",
11
                           
10
                 
12
            "Attributes must have name and value");
11
    
13
    }
12
      "undefined='undefined defaul
14
    /**
13
t value'");
15
     * Inline manifest - Invalid attribute without value
14
    }
16
    
17
 */
15
    public void testNewerStylesheet() throws Exception {
18
    public void test11() {
16
        expectFileContains("testNewerStylesheet",
19
        expectBuildExceptionContaining("test11", "Attribute has no value",
17
                           "out/out.xml",
20
                           
18
                           "new-value");
21
            "Attributes must have name and value");
19
    
22
    
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