if (this.index != index) {
try {
br.reset();
br.skip(index-1);
} catch (IOException e) { }
}
try {
br.reset();
br.skip(index-1);
} catch (IOException e) { }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/gnu/regexp/CharIndexedInputStream.java
|
|
File path: /jEdit-4.2/src/gnu/regexp/CharIndexedReader.java
|
Method name: char charAt(int)
|
|
Method name: char charAt(int)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | if (this.index != index) {↵ | | |
|
2 | try {↵ | | 1 | try {↵
|
3 | br.reset();↵ | | 2 | br.reset();↵
|
4 | br.skip(index-1);↵ | | 3 | br.skip(index-1);↵
|
5 | } catch (IOException e) { }↵ | | 4 | } catch (IOException e) { }
|
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 10 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
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.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
19 | try | | 13 | try |
20 | | | 14 | |
21 | | | 15 | |
Precondition Violations (2)
Row |
Violation |
1 | Expression br cannot be unified with expression br , because common superclass java.io.Closeable does not declare member(s) public synchronized 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 synchronized long skip(long) throws java.io.IOException |