METHOD_0 ( ) { final java . lang . String s = STRING_0 ; final java . nio . IDENT_0 . IDENT_1 channel = new org . apache . hc . core5 . http . METHOD_1 ( new java . lang . String [ ] { s } , java . nio . IDENT_2 . IDENT_3 . IDENT_4 ) ; final org . apache . hc . core5 . http . nio . IDENT_5 IDENT_6 = new org . apache . hc . core5 . http . impl . nio . METHOD_2 ( INT_0 , INT_1 , 0 , java . nio . IDENT_2 . IDENT_3 . IDENT_4 ) ; final org . apache . hc . core5 . http . impl . IDENT_7 metrics = new org . apache . hc . core5 . http . impl . METHOD_3 ( ) ; final org . apache . hc . core5 . http . impl . nio . IDENT_8 IDENT_9 = new org . apache . hc . core5 . http . impl . nio . METHOD_4 ( channel , IDENT_6 , metrics ) ; final java . nio . ByteBuffer IDENT_10 = java . nio . ByteBuffer . METHOD_5 ( INT_0 ) ; "<AssertPlaceHolder>" ; IDENT_9 . read ( IDENT_10 ) ; } read ( java . nio . IDENT_0 . IDENT_1 ) { for ( ; ; ) { switch ( state ) { case IDENT_11 : if ( ( buffer . METHOD_6 ( ) ) >= ( org . apache . hc . core5 . IDENT_12 . IDENT_13 . IDENT_14 . IDENT_15 ) ) { final int IDENT_16 = buffer . METHOD_7 ( ) ; IDENT_17 = IDENT_16 > > 8 ; if ( ( IDENT_17 ) > ( IDENT_18 ) ) { throw new org . apache . hc . core5 . IDENT_12 . METHOD_8 ( org . apache . hc . core5 . IDENT_12 . IDENT_19 . IDENT_20 , STRING_1 ) ; } type = IDENT_16 & 255 ; IDENT_21 = buffer . get ( ) ; IDENT_22 = java . lang . Math . METHOD_9 ( buffer . METHOD_7 ( ) ) ; state = org . apache . hc . core5 . IDENT_12 . impl . nio . IDENT_23 . IDENT_24 . IDENT_25 ; } else { break ; } case IDENT_25 : if ( ( buffer . METHOD_6 ( ) ) >= ( IDENT_17 ) ) { if ( ( ( IDENT_21 ) & ( IDENT_26 . IDENT_27 . getValue ( ) ) ) > 0 ) { if ( ( IDENT_17 ) == 0 ) { throw new org . apache . hc . core5 . IDENT_12 . METHOD_8 ( org . apache . hc . core5 . IDENT_12 . IDENT_19 . IDENT_28 , STRING_2 ) ; } buffer . METHOD_10 ( ) ; final int IDENT_29 = buffer . get ( ) ; if ( ( IDENT_17 ) < ( IDENT_29 + 1 ) ) { throw new org . apache . hc . core5 . IDENT_12 . METHOD_8 ( org . apache . hc . core5 . IDENT_12 . IDENT_19 . IDENT_28 , STRING_2 ) ; } buffer . METHOD_11 ( ) ; } final java . nio . ByteBuffer payload = ( ( IDENT_17 ) > 0 ) ? java . nio . ByteBuffer . METHOD_12 ( bytes , buffer . position ( ) , IDENT_17 ) : null ; buffer . position ( ( ( buffer . position ( ) ) + ( IDENT_17 ) ) ) ; state = org . apache . hc . core5 . IDENT_12 . impl . nio . IDENT_23 . IDENT_24 . IDENT_11 ; metrics . METHOD_13 ( ) ; return new org . apache . hc . core5 . IDENT_12 . IDENT_13 . METHOD_14 ( type , IDENT_21 , IDENT_22 , payload ) ; } } if ( buffer . METHOD_15 ( ) ) { buffer . METHOD_16 ( ) ; } else { buffer . METHOD_17 ( ) ; } final int IDENT_30 = channel . read ( buffer ) ; buffer . METHOD_18 ( ) ; if ( IDENT_30 > 0 ) { metrics . METHOD_19 ( IDENT_30 ) ; } if ( IDENT_30 == 0 ) { break ; } else if ( IDENT_30 < 0 ) { if ( ( ( state ) != ( org . apache . hc . core5 . IDENT_12 . impl . nio . IDENT_23 . IDENT_24 . IDENT_11 ) ) || ( buffer . METHOD_15 ( ) ) ) { throw new org . apache . hc . core5 . IDENT_12 . METHOD_20 ( STRING_3 ) ; } else { throw new org . apache . hc . core5 . http . METHOD_21 ( ) ; } } } return null ; }
org . junit . Assert . assertEquals ( 2 , IDENT_9 . read ( IDENT_10 ) )