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