File path: /jruby-1.4.0/src/org/jruby/RubyRegexp.java | File path: /jruby-1.4.0/src/org/jruby/RubyRegexp.java | |||
Method name: int readEscapedByte(Ruby, byte[], int, byte[], int, int, ByteList, ErrorMode)
|
Method name: int readEscapedByte(Ruby, byte[], int, byte[], int, int, ByteList, ErrorMode)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (p + 1 < end && bytes[p++] == (byte)'-' && (bytes[p] & 0x80) == 0) {↵ | 1 | if (p < end && (bytes[p] & 0x80) == 0) {↵ | |
2 | if (bytes[p] == (byte)'\\') {↵ | 2 | if (bytes[p] == (byte)'\\') {↵ | |
3 | p++;↵ | 3 | p++;↵ | |
4 | continue;↵ | 4 | continue;↵ | |
5 | } else {↵ | 5 | } else {↵ | |
6 | code = bytes[p++] & 0xff;↵ | 6 | code = bytes[p++] & 0xff;↵ | |
7 | break;↵ | 7 | break;↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 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.6 |
Clones location | Clones are in the same method |
Number of node comparisons | 27 |
Number of mapped statements | 5 |
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) | 2.5 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |||||||
---|---|---|---|---|---|---|---|---|---|---|
59 | if (bytes[p] == (byte)'\\') | 73 | if (bytes[p] == (byte)'\\') | |||||||
60 | p++; | 74 | p++; | |||||||
61 | continue; |
| 75 | continue; | ||||||
else | else | |||||||||
62 | code = bytes[p++] & 0xff; | 76 | code = bytes[p++] & 0xff; | |||||||
63 | break; | 77 | break; |
Row | Violation |
---|---|
1 | Statement continue; without innermost loop |
2 | Statement continue; without innermost loop |
3 | Clone fragment #1 returns variables p, code , while Clone fragment #2 returns variables p, code |