File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/filters/TokenFilterTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/filters/TokenFilterTest.java | |||
Method name: void testFilterContainsRegex()
|
Method name: void testContainsRegex()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (! hasRegex("testFilterContainsRegex"))↵ | 1 | if (! hasRegex("testContainsRegex"))↵ | |
2 | return;↵ | 2 | return;↵ | |
3 | String contents = getFileString(↵ | 3 | String contents = getFileString(↵ | |
4 | "filtercontainsregex", "result/filtercontainsregex");↵ | 4 | "containsregex", "result/containsregex");↵ | |
5 | assertStringContains(contents, "hello world");↵ | 5 | assertStringContains(contents, "hello world");↵ | |
6 | assertStringNotContains(contents, "this is the moon");↵ | 6 | assertStringNotContains(contents, "this is the moon");↵ | |
7 | assertStringContains(contents, "World here"); | 7 |
| |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 20 |
Number of mapped statements | 6 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (!hasRegex("testFilterContainsRegex")) |
| 1 | if (!hasRegex("testContainsRegex")) | |||||||||||||
2 | return; | 2 | return; | ||||||||||||||
3 | String contents = getFileString("filtercontainsregex", "result/filtercontainsregex"); |
| 3 | String contents = getFileString("containsregex", "result/containsregex"); | |||||||||||||
4 | assertStringContains(contents, "hello world"); | 4 | assertStringContains(contents, "hello world"); | ||||||||||||||
5 | assertStringNotContains(contents, "this is the moon"); | 5 | assertStringNotContains(contents, "this is the moon"); | ||||||||||||||
6 | assertStringContains(contents, "World here"); | 6 | assertStringContains(contents, "World here"); |
Row | Violation |
---|