File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/ExecTaskTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/ExecTaskTest.java | |||
Method name: void testRedirect5or6(String)
|
Method name: void testRedirector8()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (getProject().getProperty("wc.can.run") == null) {↵ | 1 | if (getProject().getProperty("wc.can.run") == null) {↵ | |
2 | return;↵ | 2 | return;↵ | |
3 | }↵ | 3 | }↵ | |
4 | assertEquals("unexpected output", "3", getFileString("redirect.out").trim());↵ | 4 | assertEquals("unexpected output", "3", getFileString("redirector.out").trim());↵ | |
5 | assertEquals("property redirect.out", "3",↵ | 5 | assertEquals("property redirector.out", "3",↵ | |
6 | getProject().getProperty("redirect.out").trim()); | 6 | getProject().getProperty("redirector.out").trim()); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 8 |
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) | 1.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (getProject().getProperty("wc.can.run") == null) | 2 | if (getProject().getProperty("wc.can.run") == null) | ||||||||||||||
3 | return; |
| 3 | return; | |||||||||||||
4 | assertEquals("unexpected output", "3", getFileString("redirect.out").trim()); |
| 4 | assertEquals("unexpected output", "3", getFileString("redirector.out").trim()); | |||||||||||||
5 | assertEquals("property redirect.out", "3", getProject().getProperty("redirect.out").trim()); |
| 5 | assertEquals("property redirector.out", "3", getProject().getProperty("redirector.out").trim()); |
Row | Violation |
---|---|
1 | Conditional return; |
2 | Conditional return; |