void testTask() {
expectPropertySet("testTask", "testTask");
}
public void testUndefined() {
expectBuildExceptionContaining("testUndefined","left out the name attribute", "No type specified");
}
public void testTaskThatIsntDefined() {
expectPropertyUnset("testTaskThatIsntDefined", "testTaskThatIsntDefined");
}
void testNoPropertyDefined() {
expectBuildException("testNoPropertyDefined",
"output property not defined");
}
/**
* A unit test for JUnit
*/
public void testNoSourcefilefound() {
expectBuildExceptionContaining("testNoSourcefilefound",
"File not found", " doesn't exist");
}
/**
* A unit test for JUnit
*/
public void testFailOnError()
throws BuildException {
expectPropertyUnset("testFailOnError","testFailOnError");
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/LoadFileTest.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | void testTask() {↵ | | 1 | void testNoPropertyDefined() {↵
|
2 | expectPropertySet("testTask", "testTask");↵ | | 2 | expect↵
|
3 | }↵ | | |
|
| | | 3 | BuildException("testNoPropertyDefined",↵
|
| | | 4 | "output property not defined");↵
|
| | | 5 | }↵
|
|
|
| | | 6 | /**↵
|
| | | 7 | * A unit test for JUnit↵
|
| | | 8 | */↵
|
4 | public void testUndefined() {↵ | | 9 | public void testNoSourcefilefound() {↵
|
5 | expectBuildExceptionContaining("testUndefined","left out the name attribute", "No type specified");↵ | | 10 | expectBuildExceptionContaining("test↵
|
6 | }↵ | | |
|
|
7 | public void testTaskThatIsntDefined()↵ | | 11 | NoSourcefilefound",↵
|
| | | 12 | "File not found", " doesn't exist");↵
|
| | | 13 | }↵
|
|
| | | 14 | /**↵
|
| | | 15 | * A unit test for JUnit↵
|
| | | 16 | */↵
|
| | | 17 | public void testFailOnError()↵
|
8 | {↵ | | 18 | throws BuildException {↵
|
9 | expectPropertyUnset("testTaskThatIsntDefined", "testTaskThatIsntDefined");↵ | | 19 | expectPropertyUnset("testFailOnError","testFailOnError");↵
|
10 | } | | 20 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |