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: 9 | Number of AST nodes: 9 | |||
1 | if (expr.match(stream, mymatch)) {↵ | 1 | if (expr.match(stream,mymatch)) {↵ | |
2 | mymatch.end[0] = mymatch.index;↵ | 2 | mymatch.end[0] = mymatch.index;↵ | |
3 | mymatch.finish(stream);↵ | 3 | mymatch.finish(stream);↵ | |
4 | stream.move(mymatch.toString().length());↵ | 4 | stream.move(mymatch.toString().length());↵ | |
5 | offset += mymatch.toString().length();↵ | 5 | offset += mymatch.toString().length();↵ | |
6 | buffer = mymatch.substituteInto(replace);↵ | 6 | buffer = mymatch.substituteInto(replace);↵ | |
7 | bufpos = 1;↵ | 7 | bufpos = 1;↵ | |
8 | // This is prone to infinite loops if replace string turns out empty.↵ | |||
9 | if (buffer.length() > 0) {↵ | 8 | if (buffer.length() > 0) {↵ | |
10 | return buffer.charAt(0);↵ | 9 | return buffer.charAt(0);↵ | |
11 | }↵ | 10 | }↵ | |
12 | } | 11 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 53 |
Number of mapped statements | 9 |
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) | 3.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | if (expr.match(stream, mymatch)) |
| 6 | if (expr.match(stream, mymatch)) | |||||||||||
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 |
3 | Type gnu.regexp.CharIndexedInputStream of variable stream does not match with type gnu.regexp.CharIndexedReader of variable stream |