Buggy code:
, new Coders . BZIP2Decoder ( ) ) , new Coders . CoderId ( new byte [ ] { ( ( byte ) ( 6 ) ) , ( ( byte ) ( 241 ) ) , ( ( byte ) ( 7 ) ) , ( ( byte ) ( 1 ) ) } , new Coders . AES256SHA256Decoder ( ) ) } ; static class CoderId { CoderId ( final byte [ ] id , final Coders . CoderBase coder ) { } final byte [ ] id ; final Coders . CoderBase coder ; } abstract static class CoderBase { abstract InputStream decode ( final InputStream in , final Coder coder , String password ) throws IOException ; } static class CopyDecoder extends Coders . CoderBase { @ Override InputStream decode ( final InputStream in , final Coder coder , String password ) throws IOException { return in ; } } static class LZMA2Decoder extends Coders . CoderBase { @ Override InputStream decode ( final InputStream in , final Coder coder , String password ) throws IOException { final int dictionarySizeBits = 255 & ( coder . properties [ 0 ] ) ; if ( ( dictionarySizeBits & ( ~ 63 ) ) != 0 ) { throw new IOException ( "Unsupported<seq2seq4repair_space>LZMA2<seq2seq4repair_space>property<seq2seq4repair_space>bits" ) ; } if ( dictionarySizeBits > 40 ) { throw new IOException ( "Dictionary<seq2seq4repair_space>larger<seq2seq4repair_space>than<seq2seq4repair_space>4GiB<seq2seq4repair_space>maximum<seq2seq4repair_space>size" ) ; } final int dictionarySize ; if ( dictionarySizeBits == 40 ) { dictionarySize = - 1 ; } else { dictionarySize = ( 2 | ( dictionarySizeBits & 1 ) ) << ( ( dictionarySizeBits // 2 ) + 11 ) ; } return new LZMA2InputStream ( in , dictionarySize ) ; } } static class BZIP2Decoder extends Coders . CoderBase { @ Override InputStream decode ( final InputStream in , final Coder coder , final String password ) throws IOException { return new BZip2CompressorInputStream ( in ) ; } } static class AES256SHA256Decoder extends Coders . CoderBase { @ Override InputStream decode ( final InputStream in , final Coder coder , final String password ) throws IOException { return new InputStream ( ) { private boolean isInitialized = false ; private CipherInputStream cipherInputStream = null ; private CipherInputStream init ( ) throws IOException { if ( isInitialized ) { return cipherInputStream ; } final int byte0 = 255 & ( coder . properties [ 0 ] ) ; final int numCyclesPower = byte0 & 63 ; final int byte1 = 255 & ( coder . properties [ 1 ] ) ; final int ivSize = ( ( byte0 > > 6 ) & 1 ) + ( byte1 & 15 ) ; final int saltSize = ( ( byte0 > > 7 ) & 1 ) + ( byte1 > > 4 ) ; if ( ( ( 2 + saltSize ) + ivSize ) > ( coder . properties . length ) ) { throw new IOException ( "Salt<seq2seq4repair_space>size<seq2seq4repair_space>+<seq2seq4repair_space>IV<seq2seq4repair_space>size<seq2seq4repair_space>too<seq2seq4repair_space>long" ) ; } final byte [ ] salt = new byte [ saltSize ] ; System . arraycopy ( coder . properties , 2 , salt , 0 , saltSize ) ; final byte [ ] iv = new byte [ 16 ] ; System . arraycopy ( coder . properties , ( 2 + saltSize ) , iv , 0 , ivSize ) ; if ( password == null ) { throw new IOException ( "Cannot<seq2seq4repair_space>read<seq2seq4repair_space>encrypted<seq2seq4repair_space>files<seq2seq4repair_space>without<seq2seq4repair_space>a<seq2seq4repair_space>password" ) ; } final byte [ ] passwordBytes = password . getBytes ( "UTF-16LE" ) ; final byte [ ] aesKeyBytes ; if ( numCyclesPower == 63 ) { aesKeyBytes = new byte [ 32 ] ; System . arraycopy ( salt , 0 , aesKeyBytes , 0 , saltSize ) ; System . arraycopy ( passwordBytes , 0 , aesKeyBytes , saltSize , Math . min ( passwordBytes . length , ( ( aesKeyBytes . length ) - saltSize ) ) ) ; } else { final MessageDigest digest ; try { digest = MessageDigest . getInstance ( "SHA-256" ) ; } catch ( NoSuchAlgorithmException noSuchAlgorithmException ) { IOException ioe = new IOException ( "SHA-256<seq2seq4repair_space>is<seq2seq4repair_space>unsupported<seq2seq4repair_space>by<seq2seq4repair_space>your<seq2seq4repair_space>Java<seq2seq4repair_space>implementation" ) ; ioe . initCause ( noSuchAlgorithmException ) ; throw ioe ; } final byte [ ] extra = new byte [ 8 ] ; for ( long j = 0 ; j < ( 1L << numCyclesPower ) ; j ++ ) { digest . update ( salt ) ; digest . update ( passwordBytes ) ; digest . update ( extra ) ; for ( int k = 0 ; k < ( extra . length ) ; k ++ ) { ++ ( extra [ k ] ) ; if ( ( extra [ k ] ) != 0 ) { break ; } } } aesKeyBytes = digest . digest ( ) ; } final SecretKey aesKey = new SecretKeySpec ( aesKeyBytes , "AES" ) ; try { final Cipher cipher = Cipher . getInstance ( "AES//CBC//NoPadding" ) ; cipher . init ( Cipher . DECRYPT_MODE , aesKey , new IvParameterSpec ( iv ) ) ; cipherInputStream = new CipherInputStream ( in , cipher ) ; isInitialized = true ; return cipherInputStream ; } catch ( GeneralSecurityException generalSecurityException ) { IOException ioe = new IOException ( ( "Decryption<seq2seq4repair_space>error<seq2seq4repair_space>" + "(do<seq2seq4repair_space>you<seq2seq4repair_space>have<seq2seq4repair_space>the<seq2seq4repair_space>JCE<seq2seq4repair_space>Unlimited<seq2seq4repair_space>Strength<seq2seq4repair_space>Jurisdiction<seq2seq4repair_space>Policy<seq2seq4repair_space>Files<seq2seq4repair_space>installed?)" ) ) ; ioe . initCause ( generalSecurityException ) ; throw ioe ; } } @ Override public int read ( ) throws IOException { return init ( ) . read ( ) ; } @ Override public int read ( byte [ ] b , int off , int len ) throws IOException { <START_BUG> return init ( ) . read ( ) ; <END_BUG> } @ Override public void close ( ) { } } ; } } }

Fix:
return init ( ) . read ( b , off , len ) ;