File path: /apache-ant-1.7.0/src/org/apache/tools/ant/filters/TokenFilter.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java | |||
Method name: int convertRegexOptions(String)
|
Method name: void execute()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (flags.indexOf('g') != -1) {↵ | 1 | if (flags.indexOf('i') != -1) {↵ | |
2 | options |= Regexp.REPLACE_ALL;↵ | 2 | options |= Regexp.MATCH_CASE_INSENSITIVE;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (flags.indexOf('i') != -1) {↵ | 4 | if (flags.indexOf('m') != -1) {↵ | |
5 | options |= Regexp.MATCH_CASE_INSENSITIVE;↵ | 5 | options |= Regexp.MATCH_MULTILINE;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (flags.indexOf('m') != -1) {↵ | 7 | if (flags.indexOf('s') != -1) {↵ | |
8 | options |= Regexp.MATCH_MULTILINE;↵ | 8 | options |= Regexp.MATCH_SINGLELINE;↵ | |
9 | } | 9 |
| |
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) | 1.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 27 |
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) | 2.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (flags.indexOf('g') != -1) |
| 10 | if (flags.indexOf('i') != -1) | ||||||||||
5 | options |= Regexp.REPLACE_ALL; |
| 11 | options |= Regexp.MATCH_CASE_INSENSITIVE; | ||||||||||
6 | if (flags.indexOf('i') != -1) |
| 12 | if (flags.indexOf('m') != -1) | ||||||||||
7 | options |= Regexp.MATCH_CASE_INSENSITIVE; |
| 13 | options |= Regexp.MATCH_MULTILINE; | ||||||||||
8 | if (flags.indexOf('m') != -1) |
| 14 | if (flags.indexOf('s') != -1) | ||||||||||
9 | options |= Regexp.MATCH_MULTILINE; |
| 15 | options |= Regexp.MATCH_SINGLELINE; |
Row | Violation |
---|---|
1 | The refactoring of the clones is infeasible, because classes org.apache.tools.ant.filters.TokenFilter and org.apache.tools.ant.taskdefs.optional.ReplaceRegExp do not have a common superclass |