bugs.java.com
Bug ID: JDK-4524848 StringBuffer's setLength() Results in Unneeded...
This problem only occurs if a String constructor has been passed a StringBuffer object as a parameter (which causes the StringBuffer's "shared" flag to be set to true) *AND* the StringBuffer's length is later set to zero. The coding error is in the "StringBuffer.setLength()" method.