A common use of StringBuffer in Java programs is that a local StringBuffer
object is used to build a character sequences which is then converted to a
String. This conversion involves allocating a new char array and copying
the StringBuffer's char array.
If both the StringBuffer and String do not escape, this operation can be
optimized: the char array from the StringBuffer can be used directly for
the String in some cases. This is possible if the compiler can determine
that the char array is never modified after the String creation.