Buggy code:
public class CookieManager extends ConfigTestElement implements Serializable , TestListener { private static final long serialVersionUID = 233L ; private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String CLEAR = "CookieManager.clearEachIteration" ; private static final String COOKIES = "CookieManager.cookies" ; private static final String POLICY = "CookieManager.policy" ; private static final String TAB = "\t" ; private static final boolean DELETE_NULL_COOKIES = JMeterUtils . getPropDefault ( "CookieManager.delete_null_cookies" , true ) ; private static final boolean ALLOW_VARIABLE_COOKIES = JMeterUtils . getPropDefault ( "CookieManager.allow_variable_cookies" , true ) ; private static final String COOKIE_NAME_PREFIX = JMeterUtils . getPropDefault ( "CookieManager.name.prefix" , "COOKIE_" ) . trim ( ) ; private static final boolean SAVE_COOKIES = JMeterUtils . getPropDefault ( "CookieManager.save.cookies" , false ) ; private static final boolean CHECK_COOKIES = JMeterUtils . getPropDefault ( "CookieManager.check.cookies" , true ) ; private transient CookieSpec cookieSpec ; private transient CollectionProperty initialCookies ; public static final String DEFAULT_POLICY = CookiePolicy . BROWSER_COMPATIBILITY ; public CookieManager ( ) { } @ Override public Object clone ( ) { } public String getPolicy ( ) { } public void setCookiePolicy ( String policy ) { } public CollectionProperty getCookies ( ) { } public int getCookieCount ( ) { } public boolean getClearEachIteration ( ) { } public void setClearEachIteration ( boolean clear ) { } public void save ( String authFile ) throws IOException { } public void addFile ( String cookieFile ) throws IOException { } private String cookieToString ( Cookie c ) { <START_BUG> StringBuffer sb = new StringBuffer ( 80 ) ; <END_BUG> sb . append ( c . getDomain ( ) ) ; sb . append ( CookieManager . TAB ) . append ( "TRUE" ) ; sb . append ( CookieManager . TAB ) . append ( c . getPath ( ) ) ; sb . append ( CookieManager . TAB ) . append ( JOrphanUtils . booleanToSTRING ( c . getSecure ( ) ) ) ; sb . append ( CookieManager . TAB ) . append ( c . getExpires ( ) ) ; sb . append ( CookieManager . TAB ) . append ( c . getName ( ) ) ; sb . append ( CookieManager . TAB ) . append ( c . getValue ( ) ) ; return sb . toString ( ) ; } @ Override public void recoverRunningVersion ( ) { } @ Override public void setRunningVersion ( boolean running ) { } public void add ( Cookie c ) { } @ Override public void clear ( ) { } private void clearCookies ( ) { } public void remove ( int index ) { } public Cookie get ( int i ) { } private org . apache . commons . httpclient . Cookie makeCookie ( Cookie jmc ) { } public org . apache . commons . httpclient . Cookie [ ] getCookiesForUrl ( URL url ) { } public String getCookieHeaderForURL ( URL url ) { } public void addCookieFromHeader ( String cookieHeader , URL url ) { } private boolean match ( Cookie a , Cookie b ) { } private void removeMatchingCookies ( Cookie newCookie ) { } public void testStarted ( ) { } public void testEnded ( ) { } public void testStarted ( String host ) { } public void testEnded ( String host ) { } public void testIterationStart ( LoopIterationEvent event ) { } }

Fix:
StringBuilder sb = new StringBuilder ( 80 ) ;