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 testTaskErrorInIncluding()
|
Method name: void testTaskErrorInIncluded()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | try {↵ | 1 | try {↵ | |
2 | executeTarget("test");↵ | 2 | executeTarget("test");↵ | |
3 | fail("should have cause a build failure");↵ | 3 | fail("should have cause a build failure");↵ | |
4 | } catch (BuildException e) {↵ | 4 | } catch (BuildException e) {↵ | |
5 | assertTrue(e.getMessage()↵ | 5 | assertTrue(e.getMessage()↵ | |
6 | + " should start with \'Warning: Could not find",↵ | 6 | + " should start with \'Warning: Could not find",↵ | |
7 | e.getMessage().startsWith("Warning: Could not find file "));↵ | 7 | e.getMessage().startsWith("Warning: Could not find file "));↵ | |
8 | assertTrue(e.getLocation().toString()↵ | 8 | assertTrue(e.getLocation().toString()↵ | |
9 | + " should end with build.xml:14: ",↵ | 9 | + " should end with included_file.xml:2: ",↵ | |
10 | e.getLocation().toString().endsWith("build.xml:14: "));↵ | 10 | e.getLocation().toString().endsWith("included_file.xml:2: "));↵ | |
11 | } | 11 |
| |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
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.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |
---|