void testNoSourcefileDefined() { expectBuildException("testNoSourcefileDefined", "source file not defined"); } /** * A unit test for JUnit */ public void testNoPropertyDefined() { expectBuildException("testNoPropertyDefined", "output property not defined"); } /** * A unit test for JUnit */ public void testNoSourcefilefound() { expectBuildExceptionContaining("testNoSourcefilefound", "File not found", " doesn't exist");
void testExcepting() { expectLogContaining("testExcepting", "Exception raised inside called program"); } public void testExceptingFork() { expectLogContaining("testExceptingFork", "Java Result:"); } public void testExceptingFoe() { expectBuildExceptionContaining("testExceptingFoe", "passes exception through", "Exception raised inside called program");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/LoadFileTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/JavaTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testNoSourcefileDefined() {
1
void test
2
        expectBuildException("testNoSourcefileDefined",
3
                "source file not defined");
4
    }
5
    /**
6
     * A unit test for JUnit
2
Excepting() {
3
        expectLogContaining("testExcepting",
4
                            "Exception raised inside called program");
7
     */
5
    }
8
    public void testNoPropertyDefined() {
6
    public void testExceptingFork() {
9
        expectBuildException("testNoPropertyDefined",
7
        expect
10
                "output property not defined");
11
    }
12
    /**
13
     * A unit test for JUnit
8
LogContaining("testExceptingFork",
9
                            "Java Result:");
14
     */
10
    }
15
    public void testNoSourcefilefound() {
11
    public void testExceptingFoe() {
16
        expectBuildExceptionContaining("testNoSourcefilefound",
12
        expectBuildExceptionContaining("test
17
                "File not found", " doesn't exist
13
ExceptingFoe",
14
            "passes exception through",
18
");
15
            "Exception raised inside called program");
19
    
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