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: 21 | |||
1 | for ( ; i < buflen ; ) {↵ | |||
2 | switch(ival = bytes[i++]) {↵ | 1 | switch(ival = bytes[i++]) {↵ | |
3 | case '0':↵ | 2 | case '0':↵ | |
3 | // ignore leading zeroes↵ | |||
4 | break; // switch↵ | |||
4 | case '1': case '2': case '3': case '4':↵ | 5 | case '1': case '2': case '3': case '4':↵ | |
5 | case '5': case '6': case '7': case '8': case '9':↵ | 6 | case '5': case '6': case '7': case '8': case '9':↵ | |
6 | chars[offset++] = (char)ival;↵ | 7 | chars[offset++] = (char)ival;↵ | |
7 | lastValidOffset = offset;↵ | 8 | lastValidOffset = offset;↵ | |
8 | break; // switch↵ | 9 | break; // switch↵ | |
9 | case '.':↵ | 10 | case '.':↵ | |
10 | state = SDECDIGIT;↵ | 11 | state = SDECDIGIT_STRICT;↵ | |
11 | break states;↵ | 12 | break states;↵ | |
12 | case 'e':↵ | |||
13 | case 'E':↵ | |||
14 | state = SEXP;↵ | |||
15 | break states;↵ | |||
16 | case '_':↵ | |||
17 | break; // switch↵ | |||
18 | default:↵ | 13 | default:↵ | |
19 | state = SCOMPLETE;↵ | 14 | state = SERR_NOT_STRICT;↵ | |
20 | break states;↵ | 15 | break states;↵ | |
21 | } // switch↵ | 16 | ↵ | |
22 | } | 17 |
| |
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.8 |
Clones location | Clones are in the same method |
Number of node comparisons | 234 |
Number of mapped statements | 21 |
Number of unmapped statements in the first code fragment | 5 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 23.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
488 | switch (ival = bytes[i++]) | 602 | switch (ival = bytes[i++]) | |||||||||||
489 | case '0': | 603 | case '0': | |||||||||||
490 | case '1': | 605 | case '1': | |||||||||||
491 | case '2': | 606 | case '2': | |||||||||||
492 | case '3': | 607 | case '3': | |||||||||||
493 | case '4': | 608 | case '4': | |||||||||||
494 | case '5': | 609 | case '5': | |||||||||||
495 | case '6': | 610 | case '6': | |||||||||||
496 | case '7': | 611 | case '7': | |||||||||||
497 | case '8': | 612 | case '8': | |||||||||||
498 | case '9': | 613 | case '9': | |||||||||||
499 | chars[offset++] = (char)ival; | 614 | chars[offset++] = (char)ival; | |||||||||||
500 | lastValidOffset = offset; | 615 | lastValidOffset = offset; | |||||||||||
501 | break; | 616 | break; | |||||||||||
502 | case '.': | 617 | case '.': | |||||||||||
503 | state = SDECDIGIT; |
| 618 | state = SDECDIGIT_STRICT; | ||||||||||
504 | break states; | 619 | break states; | |||||||||||
505 | case 'e': | | ||||||||||||
506 | case 'E': | | ||||||||||||
507 | state = SEXP; |
| | |||||||||||
508 | break states; |
| | |||||||||||
509 | case '_': | | ||||||||||||
510 | break; | 604 | break; | |||||||||||
511 | default: | 620 | default: | |||||||||||
512 | state = SCOMPLETE; |
| 621 | state = SERR_NOT_STRICT; | ||||||||||
513 | break states; | 622 | 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 | Clone fragment #1 returns variables i, ival, offset, chars, lastValidOffset , while Clone fragment #2 returns variables i, ival, offset, chars, lastValidOffset |