File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/depend/DependTest.java | |||
Method name: void testDoubleDef()
|
Method name: void testNonPublic()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | executeTarget("doubledef");↵ | 1 | executeTarget("testnonpublic");↵ | |
2 | String log = getLog();↵ | 2 | String log = getLog();↵ | |
3 | assertTrue("Task1 did not execute",↵ | 3 | assertTrue("Expected warning about APrivate",↵ | |
4 | log.indexOf("Task1") != -1);↵ | 4 | log.indexOf("The class APrivate in file") != -1);↵ | |
5 | assertTrue("Task2 did not execute↵ | 5 | assertTrue("but has not been deleted because its source file "↵ | |
6 | ",↵ | 6 | + "could not be determined",↵ | |
7 | log.indexOf("Task2") != -1); | 7 | log.indexOf("The class APrivate in file") != -1); | |
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 16 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | executeTarget("doubledef"); |
| 1 | executeTarget("testnonpublic"); | |||||||||||||
2 | String log = getLog(); | 2 | String log = getLog(); | ||||||||||||||
3 | assertTrue("Task1 did not execute", log.indexOf("Task1") != -1); |
| 3 | assertTrue("Expected warning about APrivate", log.indexOf("The class APrivate in file") != -1); | |||||||||||||
4 | assertTrue("Task2 did not execute", log.indexOf("Task2") != -1); |
| 4 | assertTrue("but has not been deleted because its source file " + "could not be determined", log.indexOf("The class APrivate in file") != -1); |
Row | Violation |
---|