void testIgnoreCase() {
expectLog(
"ignorecase",
"a is ab is b");
}
public void testIgnoreElementCase() {
expectLog(
"ignore-element-case",
"nested elementnested element");
}
public void testTextElement() {
expectLogContaining(
"textelement", "Hello world");
}
public void testTextTrim() {
expectLogContaining(
"text.trim", "[Hello world]");
}
void testSimple() {
expectLog("simple", "Hello World");
}
public void testText() {
expectLog("text", "Inner Text");
}
public 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");
}
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/MacroDefTest.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | void testIgnoreCase() {↵ | | 1 | void testSimple() {↵
|
2 | expectLog(↵ | | 2 | expectLog(↵
|
3 | ↵ | | 3 | "simple", "Hello World");↵
|
4 | ↵ | | 4 | }↵
|
|
5 | "ignorecase",↵ | | 5 | ↵
|
6 | "a is ab is b↵ | | 6 | public void testText() {↵
|
7 | ");↵ | | 7 | expectLog("text", "Inner Text");↵
|
8 | }↵ | | 8 | }↵
|
|
9 | public void testIgnoreElementCase() {↵ | | 9 | public void testDuplicateAttribute() {↵
|
10 | expectLog(↵ | | 10 | expectBuildException(↵
|
11 | "ignore-element-case",↵ | | 11 | "↵
|
12 | "nested elementnested element↵ | | 12 | duplicate.attribute",↵
|
13 | ");↵ | | 13 | "the attribute text has already been specified");↵
|
14 | }↵ | | 14 | }↵
|
|
15 | public void testTextElement() {↵ | | 15 | public void testDuplicateElement() {↵
|
16 | expectLogContaining(↵ | | 16 | expectBuildException(↵
|
17 | "textelement", "Hello world");↵ | | 17 | "↵
|
| | | 18 | duplicate.element",↵
|
18 | }↵ | | 19 | ↵
|
|
19 | public void testTextTrim() {↵ | | 20 | ↵
|
20 | expectLogContaining(↵ | | |
|
21 | "text.trim", "[Hello world]");↵ | | 21 | "the element text has already been specified");↵
|
22 | } | | 22 | }
|
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 |