--inBuf;
if (++bufpos == bufsize)
bufpos = 0;
tokenBegin = bufpos;
return buffer[bufpos];
--inBuf;
if (++bufpos == bufsize)
bufpos = 0;
return buffer[bufpos];
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/bsh/JavaCharStream.java
|
|
File path: /jEdit-4.2/src/bsh/JavaCharStream.java
|
Method name: char BeginToken()
|
|
Method name: char readChar()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | --inBuf;↵ | | 1 | --inBuf;↵
|
|
2 | if (++bufpos == bufsize)↵ | | 2 | if (++bufpos == bufsize)↵
|
3 | bufpos = 0;↵ | | 3 | bufpos = 0;↵
|
|
4 | tokenBegin = bufpos;↵ | | |
|
5 | return buffer[bufpos]; | | 4 | return buffer[bufpos];
|
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 declared in the same class |
Number of node comparisons | 8 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.6 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | --inBuf; | | 2 | --inBuf; |
3 | if (++bufpos == bufsize) | | 3 | if (++bufpos == bufsize) |
4 | | | 4 | |
5 | tokenBegin = bufpos; | | | |
6 | return buffer[bufpos]; | | 5 | return buffer[bufpos]; |
Precondition Violations (0)
Row |
Violation |