void testBasic() { expectPropertySet("basic","basic"); } public void testConditionIncomplete() { expectSpecificBuildException("condition-incomplete", "property attribute has been omitted", "The property attribute is required."); } public void testConditionEmpty() { expectSpecificBuildException("condition-empty", "no conditions", "You must nest a condition into <condition>");
void testExceptingFork() { expectLogContaining("testExceptingFork", "Java Result:"); } public void testExceptingFoe() { expectBuildExceptionContaining("testExceptingFoe", "passes exception through", "Exception raised inside called program"); } public void testExceptingFoeFork() { expectBuildExceptionContaining("testExceptingFoeFork", "exceptions turned into error codes", "Java returned:");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/ConditionTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/JavaTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testBasic() {
1
void testExceptingFork() {
2
       expectPropertySet("basic","basic
2
        expectLogContaining("testExceptingFork",
3
");
3
                            "Java Result:");
4
    }
4
    }
5
    public void testConditionIncomplete() {
5
    public void testExceptingFoe() {
6
        expectSpecificBuildException("condition-incomplete",
6
        expectBuildException
7
                                     "property attribute has been omitted",
8
                                     "The property attribute is required.
7
Containing("testExceptingFoe",
8
            "passes exception through",
9
");
9
            "Exception raised inside called program");
10
    }
10
    }
11
    public void testConditionEmpty() {
11
    public void testExceptingFoeFork() {
12
        expectSpecificBuildException("condition-empty",
12
        expectBuildException
13
                                     "no conditions",
14
                                     "You must nest a condition into <condition>
13
Containing("testExceptingFoeFork",
14
            "exceptions turned into error codes",
15
");
15
            "Java returned:");
16
    
16
    
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