Buggy code:
public class YahooBookstoreDownloadJob extends ByteArrayDownloadJob { public static final byte [ ] publicIV = new byte [ ] { ( ( byte ) ( 242 ) ) , ( ( byte ) ( 122 ) ) , ( ( byte ) ( 220 ) ) , ( ( byte ) ( 80 ) ) , ( ( byte ) ( 160 ) ) , ( ( byte ) ( 7 ) ) , ( ( byte ) ( 163 ) ) , ( ( byte ) ( 185 ) ) , ( ( byte ) ( 90 ) ) , ( ( byte ) ( 180 ) ) , ( ( byte ) ( 119 ) ) , ( ( byte ) ( 140 ) ) , ( ( byte ) ( 171 ) ) , ( ( byte ) ( 121 ) ) , ( ( byte ) ( 63 ) ) , ( ( byte ) ( 6 ) ) } ; public static final byte [ ] publicKey = new byte [ ] { ( ( byte ) ( 246 ) ) , ( ( byte ) ( 32 ) ) , ( ( byte ) ( 61 ) ) , ( ( byte ) ( 42 ) ) , ( ( byte ) ( 199 ) ) , ( ( byte ) ( 10 ) ) , ( ( byte ) ( 79 ) ) , ( ( byte ) ( 182 ) ) , ( ( byte ) ( 221 ) ) , ( ( byte ) ( 68 ) ) , ( ( byte ) ( 115 ) ) , ( ( byte ) ( 67 ) ) , ( ( byte ) ( 121 ) ) , ( ( byte ) ( 185 ) ) , ( ( byte ) ( 87 ) ) , ( ( byte ) ( 168 ) ) } ; private File file ; public YahooBookstoreDownloadJob ( String _desc , URL _url , File _file ) { } @ Override public void run ( ) throws Exception { super . run ( ) ; byte [ ] bytes = getBytes ( ) ; if ( response . hasHeader ( "x-oct-md5" ) ) { byte [ ] hash = MessageDigest . getInstance ( "MD5" ) . digest ( bytes ) ; String hashString = new BigInteger ( 1 , hash ) . toString ( 16 ) ; <START_BUG> if ( ( ( hashString . length ( ) ) % 2 ) == 1 ) <END_BUG> hashString = "0" + hashString ; if ( ! ( hashString . equals ( response . header ( "x-oct-md5" ) ) ) ) { throw new Exception ( ( ( ( "Download<seq2seq4repair_space>error;<seq2seq4repair_space>hash<seq2seq4repair_space>doesn't<seq2seq4repair_space>match:<seq2seq4repair_space>" + ( response . header ( "x-oct-md5" ) ) ) + ",<seq2seq4repair_space>" ) + hashString ) ) ; } } SecretKeySpec k = new SecretKeySpec ( YahooBookstoreDownloadJob . publicKey , "AES" ) ; int i1 = 0 ; int i2 = bytes . length ; int i4 = 0 ; byte [ ] bArr1 = new byte [ YahooBookstoreDownloadJob . publicIV . length ] ; System . arraycopy ( YahooBookstoreDownloadJob . publicIV , 0 , bArr1 , 0 , YahooBookstoreDownloadJob . publicIV . length ) ; ByteArrayOutputStream memoryStream = new ByteArrayOutputStream ( ) ; while ( i2 > 0 ) { Cipher c = Cipher . getInstance ( "AES//CFB128//NoPadding" ) ; if ( i2 > 16 ) i4 = 16 ; else i4 = i2 ; c . init ( Cipher . DECRYPT_MODE , k , new IvParameterSpec ( bArr1 ) ) ; memoryStream . write ( c . doFinal ( bytes , i1 , i4 ) ) ; i1 += 16 ; i2 -= 16 ; bArr1 [ 15 ] = ( ( byte ) ( ( bArr1 [ 15 ] ) + 1 ) ) ; if ( ( bArr1 [ 15 ] ) == 0 ) { bArr1 [ 14 ] = ( ( byte ) ( ( bArr1 [ 14 ] ) + 1 ) ) ; if ( ( bArr1 [ 14 ] ) == 0 ) { bArr1 [ 13 ] = ( ( byte ) ( ( bArr1 [ 13 ] ) + 1 ) ) ; if ( ( bArr1 [ 13 ] ) == 0 ) { bArr1 [ 12 ] = ( ( byte ) ( ( bArr1 [ 12 ] ) + 1 ) ) ; if ( ( bArr1 [ 12 ] ) == 0 ) { bArr1 [ 11 ] = ( ( byte ) ( ( bArr1 [ 11 ] ) + 1 ) ) ; if ( ( bArr1 [ 11 ] ) == 0 ) { bArr1 [ 10 ] = ( ( byte ) ( ( bArr1 [ 10 ] ) + 1 ) ) ; if ( ( bArr1 [ 10 ] ) == 0 ) bArr1 [ 9 ] = ( ( byte ) ( ( bArr1 [ 9 ] ) + 1 ) ) ; } } } } } } memoryStream . close ( ) ; byte [ ] decrypted = memoryStream . toByteArray ( ) ; int i5 = ( decrypted [ ( ( decrypted . length ) - 1 ) ] ) & 255 ; byte [ ] decrypted2 = new byte [ ( decrypted . length ) - i5 ] ; System . arraycopy ( decrypted , 0 , decrypted2 , 0 , decrypted2 . length ) ; OutputStream fos = null ; try { fos = new InflaterOutputStream ( new FileOutputStream ( file ) , new Inflater ( true ) ) ; fos . write ( decrypted2 ) ; } finally { if ( fos != null ) fos . close ( ) ; } } }

Fix:
while ( ( hashString . length ( ) ) < 32 )