File path: /jruby-1.4.0/src/org/jruby/lexer/yacc/InputStreamLexerSource.java | File path: /jruby-1.4.0/src/org/jruby/lexer/yacc/ByteListLexerSource.java | |||
Method name: void indentLoop(ByteList)
|
Method name: boolean matchMarker(ByteList, boolean, boolean)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (indent) {↵ | |||
1 | int c;↵ | 2 | int c;↵ | |
2 | while ((c = read()) != RubyYaccLexer.EOF) {↵ | 3 | while ((c = read()) != RubyYaccLexer.EOF) {↵ | |
3 | if (!Character.isWhitespace(c) || c == '\n') {↵ | 4 | if (!Character.isWhitespace(c) || c == '\n') {↵ | |
4 | unread(c);↵ | 5 | ↵ | |
6 | index--;↵ | |||
5 | break;↵ | 7 | break;↵ | |
6 | }↵ | 8 | }↵ | |
7 | buffer.append(c);↵ | 9 | }↵ | |
8 | } | 10 |
| |
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 12 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.1 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
1 | int c; | 3 | int c; | ||||
2 | while ((c = read()) != RubyYaccLexer.EOF) | 4 | while ((c = read()) != RubyYaccLexer.EOF) | ||||
3 | if (!Character.isWhitespace(c) || c == '\n') | 5 | if (!Character.isWhitespace(c) || c == '\n') | ||||
4 | unread(c); |
| | ||||
|
| 6 | index--; | ||||
5 | break; | 7 | break; | ||||
6 | buffer.append(c); |
| |
Row | Violation |
---|---|
1 | Unmatched statement unread(c); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement index--; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement buffer.append(c); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Clone fragment #1 returns variables c , while Clone fragment #2 returns variables |