else if (this == Token.token_spaces) ret = "\\s"; else { StringBuffer sb = new StringBuffer(); sb.append("["); for (int i = 0; i < this.ranges.length; i += 2) { if ((options & RegularExpression.SPECIAL_COMMA) != 0 && i > 0) sb.append(","); if (this.ranges[i] == this.ranges[i+1]) { sb.append(escapeCharInCharClass(this.ranges[i])); } else { sb.append(escapeCharInCharClass(this.ranges[i])); sb.append('-'); sb.append(escapeCharInCharClass(this.ranges[i+1])); } } sb.append("]"); ret = sb.toString();
else if (this == Token.token_not_spaces) ret = "\\S"; else { StringBuffer sb = new StringBuffer(); sb.append("[^"); for (int i = 0; i < this.ranges.length; i += 2) { if ((options & RegularExpression.SPECIAL_COMMA) != 0 && i > 0) sb.append(","); if (this.ranges[i] == this.ranges[i+1]) { sb.append(escapeCharInCharClass(this.ranges[i])); } else { sb.append(escapeCharInCharClass(this.ranges[i])); sb.append('-'); sb.append(escapeCharInCharClass(this.ranges[i+1])); } } sb.append("]"); ret = sb.toString();
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
else if (this == Token.token_spaces)
1
else if (this == Token.token_not_spaces)
2
                ret = "\\s";
2
                ret = "\\S";
3
            else {
3
            else {
4
                StringBuffer sb = new StringBuffer();
4
                StringBuffer sb = new StringBuffer();
5
                sb.append("[");
5
                sb.append("[^");
6
                for (int i = 0;  i < this.ranges.length;  i += 2) {
6
                for (int i = 0;  i < this.ranges.length;  i += 2) {
7
                    if ((options & RegularExpression.SPECIAL_COMMA) != 0 && i > 0)  sb.append(",");
7
                    if ((options & RegularExpression.SPECIAL_COMMA) != 0 && i > 0)  sb.append(",");
8
                    if (this.ranges[i] == this.ranges[i+1]) {
8
                    if (this.ranges[i] == this.ranges[i+1]) {
9
                        sb.append(escapeCharInCharClass(this.ranges[i]));
9
                        sb.append(escapeCharInCharClass(this.ranges[i]));
10
                    } else {
10
                    } else {
11
                        sb.append(escapeCharInCharClass(this.ranges[i]));
11
                        sb.append(escapeCharInCharClass(this.ranges[i]));
12
                        sb.append('-');
12
                        sb.append('-');
13
                        sb.append(escapeCharInCharClass(this.ranges[i+1]));
13
                        sb.append(escapeCharInCharClass(this.ranges[i+1]));
14
                    }
14
                    }
15
                }
15
                }
16
                sb.append("]");
16
                sb.append("]");
17
                ret = sb.toString();
17
                ret = sb.toString();
18
            
18
            
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