void testNoTrimStringCondition() { executeTarget("testNoTrimStringCondition"); } public void testStringFile() { expectBuildExceptionContaining("testStringFile", "should fail", "incompatible"); } public void testTrimFile() { expectBuildExceptionContaining("testTrimFile", "should fail", "string length function only");
void testReferences() { expectAssertion("test-references"); } public void testMultipleAssertions() { expectBuildExceptionContaining("test-multiple-assertions", "multiple assertions rejected", "Only one assertion declaration is allowed"); } public void testReferenceAbuse() { expectBuildExceptionContaining("test-reference-abuse", "reference abuse rejected", "You must not specify");
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/types/AssertionsTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testNoTrimStringCondition() {
1
void testReferences() {
2
        executeTarget("testNoTrimStringCondition");
2
        expectAssertion("test-references");
3
    }
3
    }
4
    public void testStringFile() {
4
    public void testMultipleAssertions() {
5
        expectBuildExceptionContaining("testStringFile",
5
        expectBuildExceptionContaining("test-multiple-assertions",
6
            "should fail", "incompatible
6
                "multiple assertions rejected",
7
");
7
                "Only one assertion declaration is allowed");
8
    }
8
    }
9
    public void testTrimFile() {
9
    public void testReferenceAbuse() {
10
        expectBuildExceptionContaining("testTrimFile",
10
        expectBuildExceptionContaining("test-reference-abuse",
11
            "should fail", "string length function onl
11
                "reference abuse rejected",
12
y");
12
                "You must not specify");
13
    
13
    
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