File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/MapperTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/selectors/ContainsRegexpTest.java | |||
Method name: void testCopyTaskWithTwoFilesets()
|
Method name: void testContainsRegexp()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | TaskdefForCopyTest t =↵ | 1 | TaskdefForRegexpTest MyTask =↵ | |
2 | new TaskdefForCopyTest("test1");↵ | 2 | new TaskdefForRegexpTest("containsregexp");↵ | |
3 | try {↵ | 3 | try {↵ | |
4 | t.setUp();↵ | 4 | MyTask.setUp();↵ | |
5 | t.test1();↵ | 5 | MyTask.test();↵ | |
6 | } finally {↵ | 6 | } finally {↵ | |
7 | t.tearDown();↵ | 7 | MyTask.tearDown();↵ | |
8 | } | 8 |
| |
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 in different classes having the same super 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) | 1.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | TaskdefForCopyTest t = new TaskdefForCopyTest("test1"); |
| 1 | TaskdefForRegexpTest MyTask = new TaskdefForRegexpTest("containsregexp"); | ||||||||||||||||||||||
2 | try |
| 2 | try | ||||||||||||||||||||||
3 | t.setUp(); |
| 3 | MyTask.setUp(); | ||||||||||||||||||||||
4 | t.test1(); |
| 4 | MyTask.test(); |
Row | Violation |
---|---|
1 | Expression t.test1() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression MyTask.test() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression t.test1() is a void method call, and thus it cannot be parameterized |
4 | Expression MyTask.test() is a void method call, and thus it cannot be parameterized |