void test1() { expectBuildExceptionContaining("test1", "it is required to fail :-)", "No message"); } public void test2() { expectSpecificBuildException("test2", "it is required to fail :-)", "test2"); } public void testText() { expectSpecificBuildException("testText", "it is required to fail :-)", "testText");
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'");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/FailTest.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 test1() {
1
void testWithStyleAttrAndResource() throws Exception {
2
        expectBuildExceptionContaining("test1",
2
        expectSpecificBuildException
3
                "it is required to fail :-)",
4
                "No message");
5
    }
6
    public void test2() {
7
        expectSpecificBuildException("test2",
8
            "it is required to fail :-)",
3
("testWithStyleAttrAndResource",
4
                "Must throws a BuildException", "specify the " +
5
                "stylesheet either as a filename in style " +
6
                "attribute or as a nested resource but not " +
9
            "test2");
7
                "as both");
10
    }
8
    }
11
    public void testText() {
9
    public void test
12
        expectSpecificBuildException("testText",
10
WithFileResource() throws Exception {
11
        expectFileContains("testWithFileResource", "out/out.xml", "set='value'");
13
    
12
    }
14
        "it is required to fail :-)",
13
    
15
            "testText
14
public void testWithUrlResource() throws Exception {
16
");
15
        expectFileContains("testWithUrlResource", "out/out.xml", "set='value'");
17
    
16
    
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