protected RE getCompiledPattern(int options) throws BuildException { int cOptions = getCompilerOptions(options); try { RE reg = new RE(pattern); reg.setMatchFlags(cOptions); return reg; } catch (RESyntaxException e) { throw new BuildException(e);
protected Pattern getCompiledPattern(int options) throws BuildException { int cOptions = getCompilerOptions(options); try { Pattern p = Pattern.compile(this.pattern, cOptions); return p; } catch (PatternSyntaxException e) { throw new BuildException(e);
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 RE getCompiledPattern(int options)
1
protected Pattern getCompiledPattern(int options)
2
        throws BuildException {
2
        throws BuildException {
3
        int cOptions = getCompilerOptions(options);
3
        int cOptions = getCompilerOptions(options);
4
        try {
4
        try {
5
            RE reg = new RE(pattern);
5
            
6
            reg.setMatchFlags(cOptions);
6
Pattern p = Pattern.compile(this.pattern, cOptions);
7
            return reg;
7
            return p;
8
        } catch (RESyntaxException e) {
8
        } catch (PatternSyntaxException e) {
9
            throw new BuildException(e);
9
            throw new BuildException(e);
10
        
10
        
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