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=''"); } public void testTransferParameterUnset() throws Exception { expectFileContains("testTransferParameterUnset", "out/out.xml", "undefined='${value}'"); }
void testEmpty() { expectBuildExceptionContaining("testEmpty", "missing property", "property"); } public void testNoProperty() { expectBuildExceptionContaining("testNoProperty", "missing property", "property"); } public void testNoFile() { expectBuildExceptionContaining("testNoFile", "missing file", "file"); }
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/MakeUrlTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testTransferParameterSet() throws Exception {
1
void testEmpty() {
2
        expectFileContains("testTransferParameterSet",  // target
2
        expectBuildExceptionContaining("test
3
                           "out/out.xml",               // file
4
                           "set='myvalue'");            // exptected string
5
    }
6
    public void testTransferParameterEmpty() throws Exception
3
Empty", "missing property", "property");
4
    }
7
 {
5
    public void testNoProperty() {
8
        expectFileContains("testTransferParameterEmpty",
6
        expectBuildExceptionContaining("test
9
                           "out/out.xml",
10
                           "empty=''");
11
    }
12
    public void testTransferParameterUnset() throws Exception
7
NoProperty", "missing property", "property");
8
    }
13
 {
9
    public void testNoFile() {
14
        expectFileContains("testTransferParameterUnset",
10
        expectBuildExceptionContaining("test
15
                           "out/out.xml",
16
                           "undefined='${value}'");
11
NoFile", "missing file", "file");
17
    }
12
    }
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