protected int getCompilerOptions(int options) { int cOptions = RE.MATCH_NORMAL; if (RegexpUtil.hasFlag(options, MATCH_CASE_INSENSITIVE)) { cOptions |= RE.MATCH_CASEINDEPENDENT; } if (RegexpUtil.hasFlag(options, MATCH_MULTILINE)) { cOptions |= RE.MATCH_MULTILINE; } if (RegexpUtil.hasFlag(options, MATCH_SINGLELINE)) { cOptions |= RE.MATCH_SINGLELINE; } return cOptions;
protected int getCompilerOptions(int options) { // be strict about line separator int cOptions = Pattern.UNIX_LINES; if (RegexpUtil.hasFlag(options, MATCH_CASE_INSENSITIVE)) { cOptions |= Pattern.CASE_INSENSITIVE; } if (RegexpUtil.hasFlag(options, MATCH_MULTILINE)) { cOptions |= Pattern.MULTILINE; } if (RegexpUtil.hasFlag(options, MATCH_SINGLELINE)) { cOptions |= Pattern.DOTALL; } return cOptions;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
protected int getCompilerOptions(int options) {
1
protected int getCompilerOptions(int options) {
2
        int cOptions = RE.MATCH_NORMAL
2
        // be strict about line separator
3
;
3
        int cOptions = Pattern.UNIX_LINES;
4
        if (RegexpUtil.hasFlag(options, MATCH_CASE_INSENSITIVE)) {
4
        if (RegexpUtil.hasFlag(options, MATCH_CASE_INSENSITIVE)) {
5
            cOptions |= RE.MATCH_CASEINDEPENDENT;
5
            cOptions |= Pattern.CASE_INSENSITIVE;
6
        }
6
        }
7
        if (RegexpUtil.hasFlag(options, MATCH_MULTILINE)) {
7
        if (RegexpUtil.hasFlag(options, MATCH_MULTILINE)) {
8
            cOptions |= RE.MATCH_MULTILINE;
8
            cOptions |= Pattern.MULTILINE;
9
        }
9
        }
10
        if (RegexpUtil.hasFlag(options, MATCH_SINGLELINE)) {
10
        if (RegexpUtil.hasFlag(options, MATCH_SINGLELINE)) {
11
            cOptions |= RE.MATCH_SINGLELINE;
11
            cOptions |= Pattern.DOTALL;
12
        }
12
        }
13
        return cOptions;
13
        return cOptions;
14
    
14
    
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0