void test11() { expectBuildExceptionContaining("test11", "Attribute has no value", "Attributes must have name and value"); } /** * Inline manifest - Invalid attribute without value */ public void test12() { expectBuildExceptionContaining("test12", "Section with no name", "Sections must have a name"); } /** * Inline manifest - Duplicate attribute */ public void test13() { expectBuildExceptionContaining("test13", "Duplicate Attribute", "The attribute \"Test\" may not occur more than once in the same section");
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'");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/ManifestTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/StyleTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void test11() {
1
void testTransferParameterEmpty() throws Exception {
2
        expectBuildExceptionContaining("test11", "Attribute has no value",
2
        expectFileContains("testTransferParameterEmpty",
3
                                       "Attributes must have name and value");
3
                           
4
"out/out.xml",
4
    }
5
                     
5
    /**
6
    
6
     * Inline manifest - Invalid attribute without value
7
  "empty=''");
7
     */
8
    }
8
    public void test12() {
9
    public void testTransferParameterUnset() throws Exception {
9
        expectBuildExceptionContaining("test12", "Section with no name",
10
        expectFileContains("testTransferParameterUnset",
10
                                       "Sections must have a name");
11
                           
12
"out/out.xml",
11
    }
13
                    
12
    /**
14
    
13
     * Inline manifest - Duplicate attribute
15
   "undefined='${value}'");
14
     */
16
    }
15
    public void test13() {
17
    public void testTransferParameterUnsetWithIf() throws Exception {
16
        expectBuildExceptionContaining("test13", "Duplicate Attribute",
18
        expectFileContains("testTransferParameterUnsetWithIf",
17
                                       "The attribute \"Test\" may not occur more than once in the same section
19
                           "out/out.xml",
18
");
20
                           "undefined='undefined default value'");
19
    
21
    
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