question: private static String checkAndReplaceCode ( final String searchFor , final String replaceWith , String script ) { final int index = script . indexOf ( searchFor ) ; if ( index != - 1 ) { final StringBuilder buf = new StringBuilder ( script . length ( ) ) ; buf . append ( script . substring ( 0 , index ) ) ; buf . append ( replaceWith ) ; buf . append ( checkAndReplaceCode ( searchFor , replaceWith , script . substring ( index + searchFor . length ( ) , script . length ( ) ) ) ) ; script = buf . toString ( ) ; } return script ; }
target:  replace the searchFor string with the replaceWith string within the code specified 