File path: /jEdit-4.2/src/gnu/regexp/REFilterInputStream.java | File path: /jEdit-4.2/src/gnu/regexp/REFilterReader.java | |||
Method name: int read()
|
Method name: int read()
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | mymatch.end[0] = mymatch.index;↵ | 1 | mymatch.end[0] = mymatch.index;↵ | |
2 | mymatch.finish(stream);↵ | 2 | mymatch.finish(stream);↵ | |
3 | stream.move(mymatch.toString().length());↵ | 3 | stream.move(mymatch.toString().length());↵ | |
4 | offset += mymatch.toString().length();↵ | 4 | offset += mymatch.toString().length();↵ | |
5 | buffer = mymatch.substituteInto(replace);↵ | 5 | buffer = mymatch.substituteInto(replace);↵ | |
6 | bufpos = 1;↵ | 6 | bufpos = 1;↵ | |
7 | // This is prone to infinite loops if replace string turns out empty.↵ | |||
8 | if (buffer.length() > 0) {↵ | 7 | if (buffer.length() > 0) {↵ | |
9 | return buffer.charAt(0);↵ | 8 | return buffer.charAt(0);↵ | |
10 | } | 9 |
| |
See real code fragment | See real code fragment |
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 | 20 |
Number of mapped statements | 8 |
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) | 1.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | mymatch.end[0] = mymatch.index; | 7 | mymatch.end[0] = mymatch.index; | ||||||||||||
8 | mymatch.finish(stream); |
| 8 | mymatch.finish(stream); | |||||||||||
9 | stream.move(mymatch.toString().length()); |
| 9 | stream.move(mymatch.toString().length()); | |||||||||||
10 | offset += mymatch.toString().length(); | 10 | offset += mymatch.toString().length(); | ||||||||||||
11 | buffer = mymatch.substituteInto(replace); | 11 | buffer = mymatch.substituteInto(replace); | ||||||||||||
12 | bufpos = 1; | 12 | bufpos = 1; | ||||||||||||
13 | if (buffer.length() > 0) | 13 | if (buffer.length() > 0) | ||||||||||||
14 | return buffer.charAt(0); | 14 | return buffer.charAt(0); |
Row | Violation |
---|---|
1 | Type gnu.regexp.CharIndexedInputStream of variable stream does not match with type gnu.regexp.CharIndexedReader of variable stream |
2 | Type gnu.regexp.CharIndexedInputStream of variable stream does not match with type gnu.regexp.CharIndexedReader of variable stream |