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: 27 | Number of AST nodes: 17 | |||
1 | for ( ; i < buflen ; ) {↵ | |||
2 | switch(ival = bytes[i++]) {↵ | 1 | switch(ival = bytes[i++]) {↵ | |
3 | case '0': case '1': case '2': case '3': case '4':↵ | 2 | case '0': case '1': case '2': case '3': case '4':↵ | |
4 | case '5': case '6': case '7': case '8': case '9':↵ | 3 | case '5': case '6': case '7': case '8': case '9':↵ | |
5 | chars[offset++] = (char)ival;↵ | 4 | chars[offset++] = (char)ival;↵ | |
6 | lastValidOffset = offset;↵ | 5 | lastValidOffset = offset;↵ | |
7 | break; // switch↵ | 6 | break; // switch↵ | |
8 | case '.':↵ | |||
9 | state = SDECDIGIT;↵ | |||
10 | break states;↵ | |||
11 | case 'e':↵ | |||
12 | case 'E':↵ | |||
13 | state = SEXP;↵ | |||
14 | break states;↵ | |||
15 | case '_':↵ | |||
16 | break; // switch↵ | |||
17 | default:↵ | 7 | default:↵ | |
18 | state = SCOMPLETE;↵ | 8 | state = SERR_NOT_STRICT;↵ | |
19 | break states;↵ | 9 | break states;↵ | |
20 | } // switch↵ | 10 | ↵ | |
21 | } | 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.5 |
Clones location | Clones are in the same method |
Number of node comparisons | 158 |
Number of mapped statements | 17 |
Number of unmapped statements in the first code fragment | 9 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 15.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
488 | switch (ival = bytes[i++]) | 662 | switch (ival = bytes[i++]) | |||||||||||
489 | case '0': | 663 | case '0': | |||||||||||
490 | case '1': | 664 | case '1': | |||||||||||
491 | case '2': | 665 | case '2': | |||||||||||
492 | case '3': | 666 | case '3': | |||||||||||
493 | case '4': | 667 | case '4': | |||||||||||
494 | case '5': | 668 | case '5': | |||||||||||
495 | case '6': | 669 | case '6': | |||||||||||
496 | case '7': | 670 | case '7': | |||||||||||
497 | case '8': | 671 | case '8': | |||||||||||
498 | case '9': | 672 | case '9': | |||||||||||
499 | chars[offset++] = (char)ival; | 673 | chars[offset++] = (char)ival; | |||||||||||
500 | lastValidOffset = offset; | 674 | lastValidOffset = offset; | |||||||||||
501 | break; | 675 | break; | |||||||||||
502 | case '.': | | ||||||||||||
503 | state = SDECDIGIT; |
| 677 | state = SERR_NOT_STRICT; | ||||||||||
504 | break states; | 678 | break states; | |||||||||||
505 | case 'e': | | ||||||||||||
506 | case 'E': | | ||||||||||||
507 | state = SEXP; |
| | |||||||||||
508 | break states; |
| | |||||||||||
509 | case '_': | | ||||||||||||
510 | break; |
| | |||||||||||
511 | default: | 676 | default: | |||||||||||
512 | state = SCOMPLETE; |
| | |||||||||||
513 | break states; |
| |
Row | Violation |
---|---|
1 | Unmatched statement state=SEXP; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched break states; |
3 | Unmatched break; |
4 | Unmatched statement state=SCOMPLETE; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched break states; |
6 | Clone fragment #1 returns variables i, ival, offset, chars, lastValidOffset , while Clone fragment #2 returns variables i, ival, offset, chars, lastValidOffset |