void testWithStyleAttrAndResource() throws Exception { expectSpecificBuildException("testWithStyleAttrAndResource", "Must throws a BuildException", "specify the " + "stylesheet either as a filename in style " + "attribute or as a nested resource but not " + "as both"); } public void testWithFileResource() throws Exception { expectFileContains("testWithFileResource", "out/out.xml", "set='value'"); } public void testWithUrlResource() throws Exception { expectFileContains("testWithUrlResource", "out/out.xml", "set='value'");
void testStyleIsSet() throws Exception { expectSpecificBuildException("testStyleIsSet", "no stylesheet specified", "specify the " + "stylesheet either as a filename in style " + "attribute or as a nested resource"); } public void testTransferParameterSet() throws Exception { expectFileContains("testTransferParameterSet", // target "out/out.xml", // file "set='myvalue'"); // exptected string } public void testTransferParameterEmpty() throws Exception { expectFileContains("testTransferParameterEmpty", "out/out.xml", "empty=''");
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/StyleTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testWithStyleAttrAndResource() throws Exception {
1
void testStyleIsSet() throws Exception {
2
        expectSpecificBuildException("testWithStyleAttrAndResource",
2
        expectSpecificBuildException("testStyleIsSet",
3
                "Must throws a BuildException", "specify the " +
3
                "no stylesheet specified", "specify the " +
4
                "stylesheet either as a filename in style " +
4
                "stylesheet either as a filename in style " +
5
                "attribute or as a nested resource but not " +
5
                "attribute or as a nested resource
6
                "as both");
6
");
7
    }
7
    }
8
    public void testWithFileResource() throws Exception {
8
    public void testTransferParameterSet() throws Exception {
9
        expectFileContains("testWithFileResource", "out/out.xml",
9
        expectFileContains("testTransferParameterSet",  // target
10
                           "out/out.xml",               // file
10
 "set='value'");
11
                           "set='myvalue'");            // exptected string
11
    }
12
    }
12
    public void testWithUrlResource() throws Exception {
13
    public void testTransferParameterEmpty() throws Exception {
13
        expectFileContains("testWithUrlResource", "out/out.xml", "set='value
14
        expectFileContains("testTransferParameterEmpty",
15
                           "out/out.xml",
14
'");
16
                           "empty=''");
15
    
17
    
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