METHOD_0 ( ) { java . lang . String template = STRING_0 ; IDENT_0 . IDENT_1 . generator . IDENT_2 IDENT_3 = new IDENT_0 . IDENT_1 . generator . METHOD_1 ( ) ; java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap ( ) ; map . put ( STRING_1 , STRING_2 ) ; java . lang . String result = null ; try { result = IDENT_3 . METHOD_2 ( template , map ) ; } catch ( IDENT_0 . IDENT_1 . generator . IDENT_4 IDENT_5 ) { IDENT_5 . printStackTrace ( ) ; result = STRING_3 ; } java . lang . String IDENT_6 = STRING_3 ; "<AssertPlaceHolder>" ; } METHOD_2 ( java . lang . String , java . util . Map ) { java . lang . StringBuffer builder = new java . lang . StringBuffer ( ) ; java . util . regex . IDENT_7 matcher = IDENT_0 . IDENT_1 . generator . METHOD_1 . pattern . matcher ( template ) ; int IDENT_8 = 0 ; int IDENT_9 = map . size ( ) ; while ( matcher . find ( ) ) { java . lang . String key = METHOD_3 ( matcher . group ( ) ) ; IDENT_8 ++ ; if ( map . containsKey ( key ) ) { matcher . METHOD_4 ( builder , map . get ( key ) ) ; IDENT_8 OP_0 ; IDENT_9 OP_0 ; } } if ( IDENT_8 > IDENT_9 ) { throw new IDENT_0 . IDENT_1 . generator . METHOD_5 ( STRING_4 ) ; } if ( IDENT_8 < IDENT_9 ) { throw new IDENT_0 . IDENT_1 . generator . METHOD_5 ( STRING_5 ) ; } return builder . toString ( ) ; }
org . junit . Assert . assertThat ( IDENT_6 , org . hamcrest . core . Is . is ( result ) )