void testNoJarNoClassname(){ expectBuildExceptionContaining("testNoJarNoClassname", "parameter validation", "Classname must not be null."); } public void testJarNoFork() { expectBuildExceptionContaining("testJarNoFork", "parameter validation", "Cannot execute a jar in non-forked mode. " + "Please set fork='true'. "); } public void testJarAndClassName() { expectBuildException("testJarAndClassName", "Should not be able to set both classname AND jar");
void testReadBadFile() { expectBuildExceptionContaining( "testReadBadFile", "srcfile is a directory", "srcfile is a directory!" ); } public void testReadBadFileFail() { expectBuildExceptionContaining( "testReadBadFile", "srcfile is a directory", "srcfile is a directory!" ); } public void testReadBadFileNoFail() { expectLog( "testReadBadFileNoFail", "srcfile is a directory!" );
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/JavaTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testNoJarNoClassname(){
1
void testReadBadFile() {
2
        expectBuildExceptionContaining("testNoJarNoClassname",
2
        expectBuildExceptionContaining( "testReadBadFile",
3
            "parameter validation",
3
            "
4
            "Classname must not be null.");
4
srcfile is a directory", "srcfile is a directory!" );
5
    }
5
    }
6
    public void testJarNoFork() {
6
    public void testReadBadFileFail() {
7
        expectBuildExceptionContaining("testJarNoFork",
7
        expectBuildExceptionContaining( "test
8
            "parameter validation",
9
            "Cannot execute a jar in non-forked mode. "
10
                + "Please set fork='true'. "
8
ReadBadFile",
11
);
9
            "srcfile is a directory", "srcfile is a directory!" );
12
    }
10
    }
13
    public void testJarAndClassName() {
11
    public void testReadBadFileNoFail() {
14
        expectBuildException("testJarAndClassName",
12
        expect
15
            "Should not be able to set both classname AND jar");
13
Log( "testReadBadFileNoFail", "srcfile is a directory!" );
16
    
14
    
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