METHOD_0 ( ) { System . out . println ( STRING_0 ) ; int [ ] index = new int [ ] { 10 , INT_0 , 15 , INT_1 , INT_2 } ; int key = INT_3 ; int IDENT_0 = 0 ; int end = 5 ; int expResult = - 5 ; int result = org . IDENT_1 . engine . IDENT_2 . Utils . METHOD_1 ( index , key , IDENT_0 , end ) ; "<AssertPlaceHolder>" ; } METHOD_1 ( int [ ] , int , int , int ) { if ( ( ( IDENT_3 . length ) == 0 ) || ( IDENT_0 == end ) ) { return - 1 ; } end OP_0 ; int IDENT_4 = IDENT_0 ; while ( IDENT_0 <= end ) { IDENT_4 = ( end + IDENT_0 ) > > 1 ; if ( ( IDENT_3 [ IDENT_4 ] ) < key ) { IDENT_0 = IDENT_4 + 1 ; } else if ( ( IDENT_3 [ IDENT_4 ] ) > key ) { end = IDENT_4 - 1 ; } else { return IDENT_4 ; } } if ( ( IDENT_3 [ IDENT_4 ] ) < key ) { return ( - IDENT_4 ) - 2 ; } else { return ( - IDENT_4 ) - 1 ; } }
org . junit . Assert . assertEquals ( expResult , result )