void testSlower() { executeTarget("slower"); } public void testTooSlow() { expectBuildExceptionContaining( "too_slow","out of range","out of the range 1-10"); } public void testTooFast() { expectBuildExceptionContaining( "too_fast", "out of range", "out of the range 1-10");
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/NiceTest.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 testSlower() {
1
void testReferences() {
2
        executeTarget("slower");
2
        expectAssertion("test-references");
3
    }
3
    }
4
    public void testTooSlow() {
4
    public void testMultipleAssertions() {
5
        expectBuildExceptionContaining(
5
        expectBuildExceptionContaining(
6
                "too_slow","out of range","out of the range 1-10
6
"test-multiple-assertions",
7
                "multiple assertions rejected",
7
");
8
                "Only one assertion declaration is allowed");
8
    }
9
    }
9
    public void testTooFast() {
10
    public void testReferenceAbuse() {
10
        expectBuildExceptionContaining(
11
        expectBuildExceptionContaining(
11
                "too_fast", "out of range",
12
"test-reference-abuse",
13
                "reference abuse rejected",
12
 "out of the range 1-10");
14
                "You must not specify");
13
    
15
    
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