void testSimple() { executeTarget("simple"); } public void testName() { executeTarget("name"); } public void testBaseDir() { executeTarget("basedir"); } public void testType() { executeTarget("type"); } public void testNotSelector() { expectBuildExceptionContaining( "not.selector", "checking for use as a selector (not allowed)", "fileset doesn't support the nested \"isfile");
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");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/condition/IsFileSelectedTest.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 testSimple() {
1
void test
2
        executeTarget("simple
2
EchoPrefix() throws Exception {
3
");
3
        testEchoPrefixVarious("testEchoPrefix");
4
    }
4
    }
5
    public void testName() {
5
    public void test
6
        executeTarget("name
6
EchoPrefixAsPropertyset() throws Exception {
7
");
7
        testEchoPrefixVarious("testEchoPrefixAsPropertyset");
8
    }
8
    }
9
    public void testBaseDir() {
9
    public void test
10
        executeTarget("basedir
10
EchoPrefixAsNegatedPropertyset() throws Exception {
11
");
11
        testEchoPrefixVarious("testEchoPrefixAsNegatedPropertyset");
12
    }
12
    }
13
    public void testType() {
13
    public void test
14
        executeTarget("type
14
EchoPrefixAsDoublyNegatedPropertyset() throws Exception {
15
");
15
        testEchoPrefixVarious("testEchoPrefixAsDoublyNegatedPropertyset");
16
    }
16
    }
17
    public void testNotSelector() {
17
    public void testWithPrefixAndRegex() throws Exception {
18
        expectBuildExceptionContaining(
18
        expectSpecificBuildException
19
            "not.selector",
19
("testWithPrefixAndRegex",
20
 "checking for use as a selector (not allowed)",
20
                "The target must fail with prefix and regex attributes set",
21
            "fileset doesn't support the nested \"isfile");
21
                "Please specify either prefix or regex, but not both");
22
    
22
    
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