void testTransferParameterSet() throws Exception {
expectFileContains("testTransferParameterSet", // target
"out/out.xml", // file
"set='myvalue'"); // exptected string
}
public void testTransferParameterEmpty() throws Exception {
expectFileContains("testTransferParameterEmpty",
"out/out.xml",
"empty=''");
}
public void testTransferParameterUnset() throws Exception {
expectFileContains("testTransferParameterUnset",
"out/out.xml",
"undefined='${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 testTransferParameterSet() throws Exception {↵ | | 1 | void test11() {↵
|
2 | expectFileContains("testTransferParameterSet", // target↵ | | 2 | expectBuildExceptionContaining("test↵
|
3 | "out/out.xml",↵ | | 3 | 11", "Attribute has no value",↵
|
4 | // file↵ | | 4 | ↵
|
5 | "set='myvalue'");↵ | | 5 | "Attributes must have name and value");↵
|
6 | ↵ | | 6 | }↵
|
|
7 | // exptected string↵ | | 7 | /**↵
|
| | | 8 | * Inline manifest - Invalid attribute without value↵
|
8 | }↵ | | 9 | ↵
|
| | | 10 | */↵
|
9 | public void testTransferParameterEmpty() throws Exception {↵ | | 11 | public void test12() {↵
|
10 | expectFileContains("testTransferParameterEmpty",↵ | | 12 | expectBuildExceptionContaining("test12", "Section with no name",↵
|
11 | "out/out.xml",↵ | | 13 | ↵
|
12 | ↵ | | 14 | "Sections must have a name");↵
|
13 | ↵ | | 15 | }↵
|
|
14 | ↵ | | 16 | /**↵
|
15 | "empty=''");↵ | | 17 | ↵
|
| | | 18 | * Inline manifest - Duplicate attribute↵
|
16 | }↵ | | 19 | ↵
|
| | | 20 | */↵
|
17 | public void testTransferParameterUnset() throws Exception {↵ | | 21 | public void test13() {↵
|
18 | expectFileContains("testTransferParameterUnset",↵ | | 22 | expectBuildExceptionContaining("test13", "Duplicate Attribute",↵
|
19 | "out/out.xml",↵ | | 23 | ↵
|
20 | "undefined='${value}'");↵ | | 24 | "The attribute \"Test\" may not occur more than once in the same section");↵
|
21 | | | 25 |
|
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 |