try {
while (bufsize <= index) bufsize += BUFFER_INCREMENT;
br.reset();
br.mark(bufsize);
br.skip(index-1);
} catch (IOException e) { }
try {
while (bufsize <= index) bufsize += BUFFER_INCREMENT;
br.reset();
br.mark(bufsize);
br.skip(index-1);
} catch (IOException e) { }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/gnu/regexp/CharIndexedReader.java
|
|
File path: /jEdit-4.2/src/gnu/regexp/CharIndexedInputStream.java
|
Method name: char charAt(int)
|
|
Method name: char charAt(int)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | try {↵ | | 1 | try {↵
|
2 | while (bufsize <= index) bufsize += BUFFER_INCREMENT;↵ | | 2 | while (bufsize <= index) bufsize += BUFFER_INCREMENT;↵
|
3 | br.reset();↵ | | 3 | br.reset();↵
|
4 | br.mark(bufsize);↵ | | 4 | br.mark(bufsize);↵
|
5 | br.skip(index-1);↵ | | 5 | br.skip(index-1);↵
|
6 | } catch (IOException e) { } | | 6 | } catch (IOException e) { }
|
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 in different classes |
Number of node comparisons | 21 |
-
{Non-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) | 5.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
6 | try | | 12 | try |
7 | | | 13 | |
8 | bufsize += BUFFER_INCREMENT; | | 14 | bufsize += BUFFER_INCREMENT; |
9 | | | 15 | |
10 | | | 16 | |
11 | | | 17 | |
Precondition Violations (3)
Row |
Violation |
1 | Expression br cannot be unified with expression br , because common superclass java.io.Closeable does not declare member(s) public void reset() throws java.io.IOException |
2 | Expression br cannot be unified with expression br , because common superclass java.io.Closeable does not declare member(s) public void mark(int) throws java.io.IOException |
3 | Expression br cannot be unified with expression br , because common superclass java.io.Closeable does not declare member(s) public long skip(long) throws java.io.IOException |