void testDuplicateAttribute() {
expectBuildException(
"duplicate.attribute",
"the attribute text has already been specified");
}
public void testDuplicateElement() {
expectBuildException(
"duplicate.element",
"the element text has already been specified");
}
public void testUri() {
expectLog("uri", "Hello World");
}
void testDelay() {
expectLogContaining("delay", "MyTask called");
}
public void testOnErrorReport() {
expectLogContaining("onerror.report",
"MyTaskNotPresent cannot be found");
}
public void testOnErrorIgnore() {
expectLog("onerror.ignore","");
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/TypeAdapterTest.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | void testDuplicateAttribute() {↵ | | 1 | void testDelay() {↵
|
2 | expectBuildException(↵ | | 2 | expect↵
|
3 | "duplicate.attribute",↵ | | |
|
4 | "the attribute text has already been specified");↵ | | 3 | LogContaining("delay", "MyTask called");↵
|
5 | }↵ | | 4 | }↵
|
|
6 | public void testDuplicateElement() {↵ | | 5 | public void testOnErrorReport() {↵
|
7 | expectBuildException(↵ | | 6 | expect↵
|
8 | "duplicate.element",↵ | | |
|
9 | "the element text has already been specifie↵ | | 7 | LogContaining("onerror.report",↵
|
10 | d");↵ | | 8 | "MyTaskNotPresent cannot be found");↵
|
11 | }↵ | | 9 | }↵
|
|
12 | public void testUri() {↵ | | 10 | public void testOnErrorIgnore() {↵
|
13 | expectLog("uri", "Hello World");↵ | | 11 | expectLog("onerror.ignore","");↵
|
14 | } | | 12 | }
|
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 |