METHOD_0 ( ) { java . util . List < com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_2 > records = new java . util . ArrayList < com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_2 > ( ) ; com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_2 IDENT_3 = METHOD_1 ( STRING_0 , STRING_1 , "1" , STRING_2 ) ; records . add ( IDENT_3 ) ; com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_2 IDENT_4 = METHOD_1 ( STRING_0 , STRING_1 , "2" , STRING_2 ) ; records . add ( IDENT_4 ) ; com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_2 IDENT_5 = METHOD_1 ( STRING_0 , STRING_1 , STRING_3 , STRING_2 ) ; records . add ( IDENT_5 ) ; METHOD_2 ( records ) ; expect ( IDENT_6 . execute ( ) ) . METHOD_3 ( new org . elasticsearch . client . transport . METHOD_4 ( ) ) ; METHOD_5 ( ) . times ( 3 ) ; expect ( IDENT_6 . execute ( ) ) . andReturn ( IDENT_7 ) ; expect ( IDENT_7 . METHOD_6 ( ) ) . andReturn ( IDENT_8 ) ; org . elasticsearch . action . IDENT_9 . IDENT_10 [ ] IDENT_11 = new org . elasticsearch . action . IDENT_9 . IDENT_10 [ records . size ( ) ] ; for ( int i = 0 ; i < ( IDENT_11 . length ) ; i ++ ) { IDENT_11 [ i ] = METHOD_7 ( org . elasticsearch . action . IDENT_9 . IDENT_10 . class ) ; expect ( IDENT_11 [ i ] . METHOD_8 ( ) ) . andReturn ( false ) ; replay ( IDENT_11 [ i ] ) ; } expect ( IDENT_8 . METHOD_9 ( ) ) . andReturn ( IDENT_11 ) ; replay ( IDENT_12 , IDENT_3 , IDENT_4 , IDENT_5 , buffer , IDENT_6 , IDENT_13 , IDENT_7 , IDENT_8 ) ; java . util . List < com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_2 > IDENT_14 = IDENT_15 . METHOD_10 ( buffer ) ; "<AssertPlaceHolder>" ; verify ( IDENT_12 , IDENT_3 , IDENT_4 , IDENT_5 , buffer , IDENT_6 , IDENT_13 , IDENT_7 , IDENT_8 ) ; METHOD_11 ( records ) ; METHOD_12 ( IDENT_11 ) ; } METHOD_10 ( com . amazonaws . services . IDENT_0 . IDENT_1 . IDENT_16 ) { java . util . List < com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_2 > records = buffer . METHOD_13 ( ) ; if ( records . isEmpty ( ) ) { return java . util . Collections . emptyList ( ) ; } org . elasticsearch . action . IDENT_9 . IDENT_17 IDENT_18 = IDENT_19 . METHOD_14 ( ) ; for ( com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_2 record : records ) { org . elasticsearch . action . index . IDENT_20 IDENT_21 = IDENT_19 . METHOD_15 ( record . METHOD_16 ( ) , record . getType ( ) , record . getId ( ) ) ; IDENT_21 . METHOD_17 ( record . METHOD_18 ( ) ) ; java . lang . Long version = record . METHOD_19 ( ) ; if ( version != null ) { IDENT_21 . METHOD_20 ( version ) ; } java . lang . Long IDENT_22 = record . METHOD_21 ( ) ; if ( IDENT_22 != null ) { IDENT_21 . METHOD_22 ( IDENT_22 ) ; } java . lang . Boolean create = record . METHOD_23 ( ) ; if ( create != null ) { IDENT_21 . METHOD_24 ( create ) ; } IDENT_18 . add ( IDENT_21 ) ; } while ( true ) { try { org . elasticsearch . action . IDENT_9 . IDENT_23 IDENT_24 = IDENT_18 . execute ( ) . METHOD_6 ( ) ; org . elasticsearch . action . IDENT_9 . IDENT_10 [ ] IDENT_11 = IDENT_24 . METHOD_9 ( ) ; java . util . List < com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_2 > IDENT_14 = new java . util . ArrayList < com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_2 > ( ) ; int IDENT_25 = 0 ; for ( int i = 0 ; i < ( IDENT_11 . length ) ; i ++ ) { if ( IDENT_11 [ i ] . METHOD_8 ( ) ) { com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_26 . LOG . error ( ( STRING_4 + ( IDENT_11 [ i ] . METHOD_25 ( ) ) ) ) ; org . elasticsearch . action . IDENT_9 . IDENT_10 . IDENT_27 IDENT_28 = IDENT_11 [ i ] . METHOD_26 ( ) ; if ( ( IDENT_28 . getMessage ( ) . contains ( STRING_5 ) ) || ( IDENT_28 . getMessage ( ) . contains ( STRING_6 ) ) ) { IDENT_25 ++ ; } else { IDENT_14 . add ( records . get ( i ) ) ; } } } com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_26 . LOG . info ( ( ( STRING_4 1 + ( ( ( records . size ( ) ) - ( IDENT_14 . size ( ) ) ) - IDENT_25 ) ) + STRING_4 0 ) ) ; if ( ! ( IDENT_14 . isEmpty ( ) ) ) { METHOD_27 ( ) ; com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_26 . LOG . warn ( ( ( STRING_7 + ( IDENT_14 . size ( ) ) ) + STRING_8 ) ) ; } return IDENT_14 ; } catch ( org . elasticsearch . client . transport . METHOD_4 IDENT_29 ) { com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_26 . LOG . error ( ( ( ( ( ( ( STRING_9 + ( IDENT_30 ) ) + STRING_10 ) + ( IDENT_31 ) ) + STRING_11 ) + ( IDENT_32 ) ) + STRING_12 ) , IDENT_29 ) ; sleep ( IDENT_32 ) ; } catch ( java . lang . Exception e ) { com . amazonaws . services . IDENT_0 . IDENT_1 . elasticsearch . IDENT_26 . LOG . error ( STRING_13 , e ) ; sleep ( IDENT_32 ) ; } } }
org . junit . Assert . assertTrue ( IDENT_14 . isEmpty ( ) )