void testTransferParameterUnset() throws Exception {
expectFileContains("testTransferParameterUnset",
"out/out.xml",
"undefined='${value}'");
}
public void testTransferParameterUnsetWithIf() throws Exception {
expectFileContains("testTransferParameterUnsetWithIf",
"out/out.xml",
"undefined='undefined default value'");
}
public void testNewerStylesheet() throws Exception {
expectFileContains("testNewerStylesheet",
"out/out.xml",
"new-value");
void test11() {
expectBuildExceptionContaining("test11", "Attribute has no value",
"Attributes must have name and value");
}
/**
* Inline manifest - Invalid attribute without value
*/
public void test12() {
expectBuildExceptionContaining("test12", "Section with no name",
"Sections must have a name");
}
/**
* Inline manifest - Duplicate attribute
*/
public void test13() {
expectBuildExceptionContaining("test13", "Duplicate Attribute",
"The attribute \"Test\" may not occur more than once in the same section");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/StyleTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/ManifestTest.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | void testTransferParameterUnset() throws Exception {↵ | | 1 | void test11() {↵
|
2 | expectFileContains("testTransferParameterUnset",↵ | | 2 | expectBuildExceptionContaining("test11", "Attribute has no value",↵
|
3 | "out/out.xml",↵ | | 3 | ↵
|
4 | "undefined='${value}'");↵ | | 4 | "Attributes must have name and value");↵
|
| | | 5 | }↵
|
|
| | | 6 | /**↵
|
| | | 7 | * Inline manifest - Invalid attribute without value↵
|
5 | }↵ | | 8 | ↵
|
| | | 9 | */↵
|
6 | public void testTransferParameterUnsetWithIf() throws Exception {↵ | | 10 | public void test12() {↵
|
7 | expectFileContains("testTransferParameterUnsetWithIf",↵ | | 11 | expectBuildExceptionContaining("test12", "Section with no name",↵
|
8 | "out/out.xml",↵ | | 12 | ↵
|
9 | ↵ | | 13 | "Sections must have a name");↵
|
10 | ↵ | | 14 | }↵
|
|
11 | "undefined='undefined default value'");↵ | | 15 | /**↵
|
| | | 16 | * Inline manifest - Duplicate attribute↵
|
12 | }↵ | | 17 | ↵
|
| | | 18 | */↵
|
13 | public void testNewerStylesheet() throws Exception {↵ | | 19 | public void test13() {↵
|
14 | expectFileContains("testNewerStylesheet",↵ | | 20 | expectBuildExceptionContaining("test13", "Duplicate Attribute",↵
|
15 | "out/out.xml",↵ | | 21 | ↵
|
16 | "new-value");↵ | | 22 | "The attribute \"Test\" may not occur more than once in the same section");↵
|
17 | | | 23 |
|
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 |