Buggy code:
public class AsyncHttpProviderUtils { public static final String DEFAULT_CHARSET = "ISO-8859-1" ; private static final String BODY_NOT_COMPUTED = "Response's<seq2seq4repair_space>body<seq2seq4repair_space>hasn't<seq2seq4repair_space>been<seq2seq4repair_space>computed<seq2seq4repair_space>by<seq2seq4repair_space>your<seq2seq4repair_space>AsyncHandler." ; protected static final ThreadLocal < SimpleDateFormat [ ] > simpleDateFormat = new ThreadLocal < SimpleDateFormat [ ] > ( ) { protected SimpleDateFormat [ ] initialValue ( ) { } } ; public static final SimpleDateFormat [ ] get ( ) { } static final byte SP = 32 ; static final byte HT = 9 ; static final byte CR = 13 ; static final byte EQUALS = 61 ; static final byte LF = 10 ; static final byte [ ] CRLF = new byte [ ] { AsyncHttpProviderUtils . CR , AsyncHttpProviderUtils . LF } ; static final byte COLON = 58 ; static final byte SEMICOLON = 59 ; static final byte COMMA = 44 ; static final byte DOUBLE_QUOTE = '"' ; static final String PATH = "Path" ; static final String EXPIRES = "Expires" ; static final String MAX_AGE = "Max-Age" ; static final String DOMAIN = "Domain" ; static final String SECURE = "Secure" ; static final String HTTPONLY = "HTTPOnly" ; static final String COMMENT = "Comment" ; static final String COMMENTURL = "CommentURL" ; static final String DISCARD = "Discard" ; static final String PORT = "Port" ; static final String VERSION = "Version" ; public static final URI createUri ( String u ) { } public static String getBaseUrl ( String url ) { } public static final String getBaseUrl ( URI uri ) { } public static final String getAuthority ( URI uri ) { } public static final String contentToString ( Collection < HttpResponseBodyPart > bodyParts , String charset ) throws UnsupportedEncodingException { } public static final byte [ ] contentToByte ( Collection < HttpResponseBodyPart > bodyParts ) throws UnsupportedEncodingException { } public static final String getHost ( URI uri ) { } public static final URI getRedirectUri ( URI uri , String location ) { } public static final int getPort ( URI uri ) { } public static final MultipartRequestEntity createMultipartRequestEntity ( List < Part > params , FluentStringsMap methodParams ) throws FileNotFoundException { } public static final byte [ ] readFully ( InputStream in , int [ ] lengthWrapper ) throws IOException { } private static byte [ ] doubleUp ( byte [ ] b ) { } public static String encodeCookies ( Collection < Cookie > cookies ) { } private static void add ( StringBuilder sb , String name , String val ) { } private static void addUnquoted ( StringBuilder sb , String name , String val ) { } private static void addQuoted ( StringBuilder sb , String name , String val ) { } private static void add ( StringBuilder sb , String name , int val ) { } public static String constructUserAgent ( Class < ? extends AsyncHttpProvider > httpProvider ) { } public static String parseCharset ( String contentType ) { for ( String part : contentType . split ( ";" ) ) { if ( part . trim ( ) . startsWith ( "charset=" ) ) { String [ ] val = part . split ( "=" ) ; <START_BUG> if ( ( val [ 1 ] . length ) > 1 ) { <END_BUG> return val [ 1 ] . trim ( ) ; } } } return null ; } public static Cookie parseCookie ( String value ) { } private static int convertExpireField ( String timestring ) throws Exception { } private static final String removeQuote ( String s ) { } public static void checkBodyParts ( int statusCode , Collection < HttpResponseBodyPart > bodyParts ) { } }

Fix:
if ( ( val . length ) > 1 ) {