File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/IncludeTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/IncludeTest.java | |||
Method name: void testTaskErrorInIncluded()
|
Method name: void testTaskErrorInIncluding()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | configureProject("src/etc/testcases/core/include/included_file_task_error/build.xml");↵ | 1 | configureProject("src/etc/testcases/core/include/including_file_task_error/build.xml");↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | executeTarget("test");↵ | 3 | executeTarget("test");↵ | |
4 | fail("should have cause a build failure");↵ | 4 | fail("should have cause a build failure");↵ | |
5 | } catch (BuildException e) {↵ | 5 | } catch (BuildException e) {↵ | |
6 | assertTrue(e.getMessage()↵ | 6 | assertTrue(e.getMessage()↵ | |
7 | + " should start with \'Warning: Could not find",↵ | 7 | + " should start with \'Warning: Could not find",↵ | |
8 | e.getMessage().startsWith("Warning: Could not find file "));↵ | 8 | e.getMessage().startsWith("Warning: Could not find file "));↵ | |
9 | assertTrue(e.getLocation().toString()↵ | 9 | assertTrue(e.getLocation().toString()↵ | |
10 | + " should end with included_file.xml:2: ",↵ | 10 | + " should end with build.xml:14: ",↵ | |
11 | e.getLocation().toString().endsWith("included_file.xml:2: "));↵ | 11 | e.getLocation().toString().endsWith("build.xml:14: "));↵ | |
12 | } | 12 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | configureProject("src/etc/testcases/core/include/included_file_task_error/build.xml"); |
| 1 | configureProject("src/etc/testcases/core/include/including_file_task_error/build.xml"); | |||||||||||||
2 | try |
| 2 | try | |||||||||||||
3 | executeTarget("test"); | 3 | executeTarget("test"); | ||||||||||||||
4 | fail("should have cause a build failure"); | 4 | fail("should have cause a build failure"); |
Row | Violation |
---|