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