void testEchoPrefix() throws Exception { testEchoPrefixVarious("testEchoPrefix"); } public void testEchoPrefixAsPropertyset() throws Exception { testEchoPrefixVarious("testEchoPrefixAsPropertyset"); } public void testEchoPrefixAsNegatedPropertyset() throws Exception { testEchoPrefixVarious("testEchoPrefixAsNegatedPropertyset"); } public void testEchoPrefixAsDoublyNegatedPropertyset() throws Exception { testEchoPrefixVarious("testEchoPrefixAsDoublyNegatedPropertyset"); } public void testWithPrefixAndRegex() throws Exception { expectSpecificBuildException("testWithPrefixAndRegex", "The target must fail with prefix and regex attributes set", "Please specify either prefix or regex, but not both"); }
void testMappedFileset() { executeTarget("testMappedFileset"); } /** * test the explicit mapped file set */ public void testExplicitMappedFileset() { executeTarget("testExplicitMappedFileset"); } /** * test the mapped file list */ public void testMappedFilelist() { executeTarget("testMappedFilelist"); } /** * test the pattern attribute */ public void testGoodPattern() { executeTarget("testGoodPattern"); } /** * test the pattern attribute again */ public void testBadPattern() { expectBuildExceptionContaining("testBadPattern", "No parsing exception thrown", "Unparseable"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/TouchTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testEchoPrefix() throws Exception {
1
void test
2
        testEchoPrefixVarious("testEchoPrefix");
3
    }
4
    public void testEchoPrefixAsPropertyset() throws Exception {
5
        testEchoPrefixVarious("testEchoPrefixAsPropertyset");
6
    }
7
    public void testEchoPrefixAsNegatedPropertyset() throws Exception {
8
        testEchoPrefixVarious("testEchoPrefixAsNegatedPropertyset");
2
MappedFileset() {
3
        executeTarget("testMappedFileset");
4
    }
5
    /**
6
     * test the explicit mapped file set
7
     */
8
    public void testExplicitMappedFileset() {
9
        executeTarget("testExplicitMappedFileset");
10
    }
11
    /**
12
     * test the mapped file list
13
     */
14
    public void testMappedFilelist() {
15
        executeTarget("testMappedFilelist");
16
    }
17
    /**
18
     * test the pattern attribute
9
    }
19
    
20
 */
10
    public void testEchoPrefixAsDoublyNegatedPropertyset() throws Exception {
21
    public void test
11
        testEchoPrefixVarious("testEchoPrefixAsDoublyNegatedPropertyset");
22
GoodPattern() {
23
        executeTarget("testGoodPattern");
24
    }
25
    /**
26
     * test the pattern attribute again
12
    }
27
    
28
 */
13
    public void testWithPrefixAndRegex() throws Exception {
29
    public void testBadPattern() {
14
        expectSpecificBuildException("testWithPrefixAndRegex",
30
        expectBuildException
15
                "The target must fail with prefix and regex attributes set",
16
                "Please specify either prefix or regex, but not both
31
Containing("testBadPattern",
17
");
32
            "No parsing exception thrown", "Unparseable");
18
    }
33
    }
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