void testTrimString() { executeTarget("testTrimString"); } public void testTrimStringCondition() { executeTarget("testTrimStringCondition"); } public void testNoTrimString() { executeTarget("testNoTrimString"); } public void testNoTrimStringCondition() { executeTarget("testNoTrimStringCondition"); } public void testStringFile() { expectBuildExceptionContaining("testStringFile", "should fail", "incompatible");
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/LengthTest.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 testTrimString() {
1
void test
2
        executeTarget("testTrimString");
3
    }
4
    public void testTrimStringCondi
2
EchoPrefix() throws Exception {
3
        testEchoPrefixVarious("testEchoPrefix");
4
    }
5
tion() {
5
    public void testEchoPrefixAsPropertyset() throws Exception {
6
        executeTarget("testTrimStringCondition");
6
        
7
    }
8
    public void testNoTrimString() {
9
        executeTarget("testNoTrimString");
10
    }
11
    public void testNoTrimStringCondi
7
testEchoPrefixVarious("testEchoPrefixAsPropertyset");
8
    }
9
    public void testEchoPrefixAsNegatedPropertyset() throws Exception {
10
        testEchoPrefixVarious("testEchoPrefixAsNegatedPropertyset");
11
    }
12
tion() {
12
    public void testEchoPrefixAsDoublyNegatedPropertyset() throws Exception {
13
        executeTarget("testNoTrimStringCondition");
13
        
14
    }
15
    public void testStringFile()
14
testEchoPrefixVarious("testEchoPrefixAsDoublyNegatedPropertyset");
15
    }
16
 {
16
    public void testWithPrefixAndRegex() throws Exception {
17
        expectBuildExceptionContaining("testStringFile",
17
        expectSpecificBuildException
18
            "should fail", "incompatible
18
("testWithPrefixAndRegex",
19
                "The target must fail with prefix and regex attributes set",
19
");
20
                "Please specify either prefix or regex, but not both");
20
    
21
    
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