Buggy code:
public class CBZip2OutputStream extends OutputStream implements BZip2Constants { protected static final int SETMASK = 1 << 21 ; protected static final int CLEARMASK = ~ ( CBZip2OutputStream . SETMASK ) ; protected static final int GREATER_ICOST = 15 ; protected static final int LESSER_ICOST = 0 ; protected static final int SMALL_THRESH = 20 ; protected static final int DEPTH_THRESH = 10 ; protected static final int QSORT_STACK_SIZE = 1000 ; private static void panic ( ) { } private void makeMaps ( ) { } protected static void hbMakeCodeLengths ( char [ ] len , int [ ] freq , int alphaSize , int maxLen ) { } int last ; int origPtr ; int blockSize100k ; boolean blockRandomised ; int bytesIn ; int bytesOut ; int bsBuff ; int bsLive ; CRC mCrc = new CRC ( ) ; private boolean [ ] inUse = new boolean [ 256 ] ; private int nInUse ; private char [ ] seqToUnseq = new char [ 256 ] ; private char [ ] unseqToSeq = new char [ 256 ] ; private char [ ] selector = new char [ MAX_SELECTORS ] ; private char [ ] selectorMtf = new char [ MAX_SELECTORS ] ; private char [ ] block ; private int [ ] quadrant ; private int [ ] zptr ; private short [ ] szptr ; private int [ ] ftab ; private int nMTF ; private int [ ] mtfFreq = new int [ MAX_ALPHA_SIZE ] ; private int workFactor ; private int workDone ; private int workLimit ; private boolean firstAttempt ; private int nBlocksRandomised ; private int currentChar = - 1 ; private int runLength = 0 ; public CBZip2OutputStream ( OutputStream inStream ) throws IOException { } public CBZip2OutputStream ( OutputStream inStream , int inBlockSize ) throws IOException { } public void write ( int bv ) throws IOException { } private void writeRun ( ) throws IOException { } boolean closed = false ; public void finalize ( ) throws Throwable { } public void close ( ) throws IOException { } public void flush ( ) throws IOException { } private int blockCRC ; private int combinedCRC ; private void initialize ( ) throws IOException { } private int allowableBlockSize ; private void initBlock ( ) { } private void endBlock ( ) throws IOException { blockCRC = mCrc . getFinalCRC ( ) ; <START_BUG> combinedCRC = ( ( combinedCRC ) << 1 ) | ( ( combinedCRC ) > > 31 ) ; <END_BUG> combinedCRC ^= blockCRC ; doReversibleTransformation ( ) ; bsPutUChar ( 49 ) ; bsPutUChar ( 65 ) ; bsPutUChar ( 89 ) ; bsPutUChar ( 38 ) ; bsPutUChar ( 83 ) ; bsPutUChar ( 89 ) ; bsPutint ( blockCRC ) ; if ( blockRandomised ) { bsW ( 1 , 1 ) ; ( nBlocksRandomised ) ++ ; } else { bsW ( 1 , 0 ) ; } moveToFrontCodeAndSend ( ) ; } private void endCompression ( ) throws IOException { } private void hbAssignCodes ( int [ ] code , char [ ] length , int minLen , int maxLen , int alphaSize ) { } private void bsSetStream ( OutputStream f ) { } private void bsFinishedWithStream ( ) throws IOException { } private void bsW ( int n , int v ) throws IOException { } private void bsPutUChar ( int c ) throws IOException { } private void bsPutint ( int u ) throws IOException { } private void bsPutIntVS ( int numBits , int c ) throws IOException { } private void sendMTFValues ( ) throws IOException { } private void moveToFrontCodeAndSend ( ) throws IOException { } private OutputStream bsStream ; private void simpleSort ( int lo , int hi , int d ) { } private void vswap ( int p1 , int p2 , int n ) { } private char med3 ( char a , char b , char c ) { } private class StackElem { int ll ; int hh ; int dd ; } private void qSort3 ( int loSt , int hiSt , int dSt ) { } private void mainSort ( ) { } private void randomiseBlock ( ) { } private void doReversibleTransformation ( ) { } private boolean fullGtU ( int i1 , int i2 ) { } private int [ ] incs = new int [ ] { 1 , 4 , 13 , 40 , 121 , 364 , 1093 , 3280 , 9841 , 29524 , 88573 , 265720 , 797161 , 2391484 } ; private void allocateCompressStructures ( ) { } private void generateMTFValues ( ) { } }

Fix:
combinedCRC = ( ( combinedCRC ) << 1 ) | ( ( combinedCRC ) > > > 31 ) ;