tok = lexer.getNext();
if (tok.getType() != RoseToken.LIST)
{
System.out.println(" Parsing error in parseList - expecting list token");
return null;
}
tok = lexer.getNext();
if (tok.getType() != RoseToken.LEFT_PAREN)
{
System.out.println(" Parsing error in parseList - expecting left parenthesis");
return null;
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/parser/RoseParser.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/parser/RoseParser.java
|
Method name: RoseNode parseList(String)
|
|
Method name: RoseNode parseList(String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | tok = lexer.getNext();↵ | | 1 | tok = lexer.getNext();↵
|
2 | if (tok.getType() != RoseToken.LIST)↵ | | 2 | if (tok.getType() != RoseToken.L↵
|
| | | 3 | EFT_PAREN)↵
|
3 | {↵ | | 4 | {↵
|
4 | System.out.println(" Parsing error in parseList - expecting list token");↵ | | 5 | System.out.println(" Parsing error in parseList - expecting l↵
|
| | | 6 | eft parenthesis");↵
|
5 | return null;↵ | | 7 | return null;↵
|
6 | } | | 8 | }
|
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 method |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 5.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
11 | tok = lexer.getNext(); | | 25 | tok = lexer.getNext(); |
12 | if (tok.getType() != RoseToken.LIST) | | 26 | if (tok.getType() != RoseToken.LEFT_PAREN) |
13 | System.out.println(" Parsing error in parseList - expecting list token"); | | 27 | System.out.println(" Parsing error in parseList - expecting left parenthesis"); |
14 | | | 28 | |
Precondition Violations (0)
Row |
Violation |