tok = lexer.getNext();
if (tok.getType() != RoseToken.STRING)
{
System.out.println(" Parsing error in parseS_prime - expecting string");
return null;
}
tok = lexer.getNext();
if (tok.getType() != RoseToken.RIGHT_PAREN)
{
System.out.println(" Parsing error in parseList - expecting right 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 parseS_prime(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.STRING)↵ | | 2 | if (tok.getType() != RoseToken.RIGHT_PAREN)↵
|
3 | {↵ | | 3 | {↵
|
4 | System.out.println(" Parsing error in parseS_prime - expecting string");↵ | | 4 | System.out.println(" Parsing error in parseList - expecting right parenthesis");↵
|
5 | return null;↵ | | 5 | return null;↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 11 |
-
{Non-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) | 9.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
15 | tok = lexer.getNext(); | | 37 | tok = lexer.getNext(); |
16 | if (tok.getType() != RoseToken.STRING) | | 38 | if (tok.getType() != RoseToken.RIGHT_PAREN) |
17 | System.out.println(" Parsing error in parseS_prime - expecting string"); | | 39 | System.out.println(" Parsing error in parseList - expecting right parenthesis"); |
18 | | | 40 | |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables tok , while Clone fragment #2 returns variables |