void tearDown() { executeTarget("cleanup"); } /** make sure tokenfilter exists */ public void testTokenfilter() throws IOException { executeTarget("tokenfilter"); } public void testTrimignore() throws IOException { expectLogContaining("trimignore", "Hello-World"); } public void testStringTokenizer() throws IOException { expectLogContaining( "stringtokenizer", "#This#is#a#number#of#words#");
void testAddFilter() { executeTarget("addfilter"); } public void testAddSelector() { executeTarget("addselector"); } public void testNestedA() { expectLogContaining("nested.a", "add A called"); } public void testNestedB() { expectLogContaining("nested.b", "add B called");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/filters/TokenFilterTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/AddTypeTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void tearDown() {
1
void testAddFilter() {
2
        executeTarget("cleanup");
2
        executeTarget("addfilter");
3
    }
3
    }
4
    /** make sure tokenfilter exists */
4
    
5
    public void testTokenfilter() throws IOException {
5
public void testAddSelector() {
6
        executeTarget("tokenfilter");
6
        executeTarget("addselector");
7
    }
7
    }
8
    public void testTrimignore() throws IOException {
8
    public void testNestedA() {
9
        expectLogContaining("trimignore", "Hello-World");
9
        expectLogContaining("nested.a", "add A called");
10
    }
10
    }
11
    public void testStringTokenizer() throws IOException {
11
    public void test
12
        expectLogContaining(
13
            "stringtokenizer", "#This#is#a#number#of#words#
12
NestedB() {
14
");
13
        expectLogContaining("nested.b", "add B called");
15
    
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