void testSrcDirTest() { expectBuildException("srcDirTest", "Src cannot be a directory."); } public void testEncoding() { expectSpecificBuildException("encoding", "<untar> overrides setEncoding.", "The untar task doesn't support the " + "encoding attribute"); } public void testResourceCollection() throws java.io.IOException { testLogoExtraction("resourceCollection");
void testInvalidClassname() throws Exception { executeJspCompile("testInvalidClassname", "_1nvalid_0002dclassname_jsp.java"); } /** * A unit test for JUnit */ public void testNoTld() throws Exception { // expectBuildExceptionContaining("testNoTld", // "Jasper found an error in a file", // "Java returned: 9"); expectBuildExceptionContaining("testNoTld", "not found", "Java returned: 9"); } /** * A unit test for JUnit */ public void testNotAJspFile() throws Exception { executeTarget("testNotAJspFile");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/UntarTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/JspcTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testSrcDirTest() {
1
void testInvalidClassname() throws Exception {
2
        expectBuildException("srcDirTest", "Src cannot be a directory.");
2
        executeJspCompile("testInvalidClassname",
3
                "_1nvalid_0002dclassname_jsp.java");
4
    }
5
    /**
6
     * A unit test for JUnit
3
    }
7
    
8
 */
4
    public void testEncoding() {
9
    public void test
10
NoTld() throws Exception {
5
        expectSpecificBuildException("encoding",
11
//         expectBuildExceptionContaining("testNoTld",
6
                                     "<untar> overrides setEncoding.
12
//                 "Jasper found an error in a file",
13
//                 "Java returned: 9");
7
",
14
         expectBuildExceptionContaining("testNoTld",
8
                    
15
                 "not found",
9
                 "The untar task doesn't support the "
16
                 "
10
                                     + "encoding attribute");
17
Java returned: 9");
18
    }
19
    /**
20
     * A unit test for JUnit
11
    }
21
    
22
 */
12
    public void testResourceCollection() throws java.io.IOException {
23
    public void testNotAJspFile()  throws Exception {
13
        testLogoExtraction("resourceCollection");
24
        executeTarget("testNotAJspFile");
14
    
25
    
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