File path: /jruby-1.4.0/src/org/jruby/util/Convert.java | File path: /jruby-1.4.0/src/org/jruby/util/Convert.java | |||
Method name: double byteArrayToDouble(byte[], int, int, boolean)
|
Method name: double byteArrayToDouble(byte[], int, int, boolean)
|
|||
Number of AST nodes: 21 | Number of AST nodes: 17 | |||
1 | switch(ival = bytes[i++]) {↵ | 1 | switch(ival = bytes[i++]) {↵ | |
2 | case '0':↵ | 2 | case '0':↵ | |
3 | // ignore leading zeroes↵ | |||
4 | break; // switch↵ | |||
5 | case '1': case '2': case '3': case '4':↵ | 3 | case '1': case '2': case '3': case '4':↵ | |
6 | case '5': case '6': case '7': case '8': case '9':↵ | 4 | case '5': case '6': case '7': case '8': case '9':↵ | |
7 | chars[offset++] = (char)ival;↵ | 5 | chars[offset++] = (char)ival;↵ | |
8 | lastValidOffset = offset;↵ | 6 | lastValidOffset = offset;↵ | |
9 | break; // switch↵ | 7 | break; // switch↵ | |
10 | case '.':↵ | |||
11 | state = SDECDIGIT_STRICT;↵ | |||
12 | break states;↵ | |||
13 | default:↵ | 8 | default:↵ | |
14 | state = SERR_NOT_STRICT;↵ | 9 | state = SERR_NOT_STRICT;↵ | |
15 | break states;↵ | 10 | break states;↵ | |
16 | } | 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.7 |
Clones location | Clones are in the same method |
Number of node comparisons | 145 |
Number of mapped statements | 17 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 68.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
602 | switch (ival = bytes[i++]) | 662 | switch (ival = bytes[i++]) | |||||||||||
603 | case '0': |
| 672 | case '9': | ||||||||||
604 | break; | 675 | break; | |||||||||||
605 | case '1': | 664 | case '1': | |||||||||||
606 | case '2': | 665 | case '2': | |||||||||||
607 | case '3': | 666 | case '3': | |||||||||||
608 | case '4': | 667 | case '4': | |||||||||||
609 | case '5': | 668 | case '5': | |||||||||||
610 | case '6': | 669 | case '6': | |||||||||||
611 | case '7': | 670 | case '7': | |||||||||||
612 | case '8': | 671 | case '8': | |||||||||||
613 | case '9': |
| 663 | case '0': | ||||||||||
614 | chars[offset++] = (char)ival; | 673 | chars[offset++] = (char)ival; | |||||||||||
615 | lastValidOffset = offset; | 674 | lastValidOffset = offset; | |||||||||||
616 | break; |
| | |||||||||||
617 | case '.': | | ||||||||||||
618 | state = SDECDIGIT_STRICT; |
| 677 | state = SERR_NOT_STRICT; | ||||||||||
619 | break states; | 678 | break states; | |||||||||||
620 | default: | 676 | default: | |||||||||||
621 | state = SERR_NOT_STRICT; | | ||||||||||||
622 | break states; |
| |
Row | Violation |
---|---|
1 | Unmatched break; |
2 | Unmatched break states; |
3 | Clone fragment #1 returns variables i, ival, offset, chars, lastValidOffset , while Clone fragment #2 returns variables i, ival, offset, chars, lastValidOffset |