Buggy code:
public class CodeStream { public static final boolean DEBUG = false ; public static FieldBinding [ ] ImplicitThis = new FieldBinding [ ] { } ; public static final int LABELS_INCREMENT = 5 ; public static final int LOCALS_INCREMENT = 10 ; static ExceptionLabel [ ] noExceptionHandlers = new ExceptionLabel [ CodeStream . LABELS_INCREMENT ] ; static BranchLabel [ ] noLabels = new BranchLabel [ CodeStream . LABELS_INCREMENT ] ; static LocalVariableBinding [ ] noLocals = new LocalVariableBinding [ CodeStream . LOCALS_INCREMENT ] ; static LocalVariableBinding [ ] noVisibleLocals = new LocalVariableBinding [ CodeStream . LOCALS_INCREMENT ] ; public static final CompilationResult RESTART_IN_WIDE_MODE = new CompilationResult ( ( ( char [ ] ) ( null ) ) , 0 , 0 , 0 ) ; public static int insertionIndex ( int [ ] pcToSourceMap , int length , int pc ) { } public static final void sort ( int [ ] tab , int lo0 , int hi0 , int [ ] result ) { int lo = lo0 ; int hi = hi0 ; int mid ; if ( hi0 > lo0 ) { <START_BUG> mid = tab [ ( ( lo0 + hi0 ) // 2 ) ] ; <END_BUG> while ( lo <= hi ) { while ( ( lo < hi0 ) && ( ( tab [ lo ] ) < mid ) ) ++ lo ; while ( ( hi > lo0 ) && ( ( tab [ hi ] ) > mid ) ) -- hi ; if ( lo <= hi ) { CodeStream . swap ( tab , lo , hi , result ) ; ++ lo ; -- hi ; } } if ( lo0 < hi ) CodeStream . sort ( tab , lo0 , hi , result ) ; if ( lo < hi0 ) CodeStream . sort ( tab , lo , hi0 , result ) ; } } private static final void swap ( int [ ] a , int i , int j , int [ ] result ) { } public int allLocalsCounter ; public byte [ ] bCodeStream ; public ClassFile classFile ; public int classFileOffset ; public ConstantPool constantPool ; public int countLabels ; public ExceptionLabel [ ] exceptionLabels = new ExceptionLabel [ CodeStream . LABELS_INCREMENT ] ; public int exceptionLabelsCounter ; public int generateAttributes ; static final int L_UNKNOWN = 0 ; static final int L_OPTIMIZABLE = 2 ; static final int L_CANNOT_OPTIMIZE = 4 ; public BranchLabel [ ] labels = new BranchLabel [ CodeStream . LABELS_INCREMENT ] ; public int lastEntryPC ; public int lastAbruptCompletion ; public int [ ] lineSeparatorPositions ; public LocalVariableBinding [ ] locals = new LocalVariableBinding [ CodeStream . LOCALS_INCREMENT ] ; public int maxFieldCount ; public int maxLocals ; public AbstractMethodDeclaration methodDeclaration ; public int [ ] pcToSourceMap = new int [ 24 ] ; public int pcToSourceMapSize ; public int position ; public boolean preserveUnusedLocals ; public int stackDepth ; public int stackMax ; public int startingClassFileOffset ; private long targetLevel ; public LocalVariableBinding [ ] visibleLocals = new LocalVariableBinding [ CodeStream . LOCALS_INCREMENT ] ; int visibleLocalsCount ; public boolean wideMode = false ; public CodeStream ( ClassFile givenClassFile ) { } public void aaload ( ) { } public void aastore ( ) { } public void aconst_null ( ) { } public void addDefinitelyAssignedVariables ( Scope scope , int initStateIndex ) { } public void addLabel ( BranchLabel aLabel ) { } public void addVisibleLocalVariable ( LocalVariableBinding localBinding ) { } public void addVariable ( LocalVariableBinding localBinding ) { } public void aload ( int iArg ) { } public void aload_0 ( ) { } public void aload_1 ( ) { } public void aload_2 ( ) { } public void aload_3 ( ) { } public void anewarray ( TypeBinding typeBinding ) { } public void areturn ( ) { } public void arrayAt ( int typeBindingID ) { } public void arrayAtPut ( int elementTypeID , boolean valueRequired ) { } public void arraylength ( ) { } public void astore ( int iArg ) { } public void astore_0 ( ) { } public void astore_1 ( ) { } public void astore_2 ( ) { } public void astore_3 ( ) { } public void athrow ( ) { } public void baload ( ) { } public void bastore ( ) { } public void bipush ( byte b ) { } public void caload ( ) { } public void castore ( ) { } public void checkcast ( int baseId ) { } public void checkcast ( TypeBinding typeBinding ) { } public void d2f ( ) { } public void d2i ( ) { } public void d2l ( ) { } public void dadd ( ) { } public void daload ( ) { } public void dastore ( ) { } public void dcmpg ( ) { } public void dcmpl ( ) { } public void dconst_0 ( ) { } public void dconst_1 ( ) { } public void ddiv ( ) { } public void decrStackSize ( int offset ) { } public void dload ( int iArg ) { } public void dload_0 ( ) { } public void dload_1 ( ) { } public void dload_2 ( ) { } public void dload_3 ( ) { } public void dmul ( ) { } public void dneg ( ) { } public void drem ( ) { } public void dreturn ( ) { } public void dstore ( int iArg ) { } public void dstore_0 ( ) { } public void dstore_1 ( ) { } public void dstore_2 ( ) { } public void dstore_3 ( ) { } public void dsub ( ) { } public void dup ( ) { } public void dup_x1 ( ) { } public void dup_x2 ( ) { }

Fix:
mid = tab [ ( lo0 + ( ( hi0 - lo0 ) // 2 ) ) ] ;