this.next();
Token tok = Token.createParen(this.parseRegex(), 0);
if (this.read() != T_RPAREN) throw ex("parser.factor.1", this.offset-1);
this.next(); // Skips ')'
return tok;
this.next();
Token tok = Token.createParen(this.parseRegex(), 0);
if (this.read() != T_RPAREN)
throw ex("parser.factor.1", this.offset - 1);
this.next(); // Skips ')'
return tok;
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: Token processParen2()
|
|
Method name: Token processParen()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | this.next();↵ | | 1 | this.next();↵
|
2 | Token tok = Token.createParen(this.parseRegex(), 0);↵ | | 2 | Token tok = Token.createParen(this.parseRegex(), 0);↵
|
3 | if (this.read() != T_RPAREN)↵ | | 3 | if (this.read() != T_RPAREN)↵
|
4 | throw ex("parser.factor.1", this.offset-1);↵ | | 4 | throw ex("parser.factor.1", this.offset - 1);↵
|
5 | this.next(); // Skips ')'↵ | | 5 | this.next(); // Skips ')'↵
|
6 | return tok; | | 6 | return tok;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same java file |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
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) | 3.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | this.next(); | | 1 | this.next(); |
2 | Token tok = Token.createParen(this.parseRegex(), 0); | | 2 | Token tok = Token.createParen(this.parseRegex(), 0); |
3 | if (this.read() != T_RPAREN) | | 3 | if (this.read() != T_RPAREN) |
4 | throw ex("parser.factor.1", this.offset - 1); | | 4 | throw ex("parser.factor.1", this.offset - 1); |
5 | this.next(); | | 5 | this.next(); |
6 | return tok; | | 6 | return tok; |
Precondition Violations (0)
Row |
Violation |