question: public static String replace ( String a , String b , String c ) { StringBuffer result = new StringBuffer ( c . length ( ) ) ; int i = 0 ; int j = c . indexOf ( a ) ; while ( j >= i ) { result . append ( c . substring ( i , j ) ) ; result . append ( b ) ; i = j + a . length ( ) ; j = c . indexOf ( a , i ) ; } result . append ( c . substring ( i , c . length ( ) ) ) ; return result . toString ( ) ; }
target:  Replaces a with b in c.