Buggy code:
, new String [ ] { "sdot" , "8901" } , new String [ ] { "lceil" , "8968" } , new String [ ] { "rceil" , "8969" } , new String [ ] { "lfloor" , "8970" } , new String [ ] { "rfloor" , "8971" } , new String [ ] { "lang" , "9001" } , new String [ ] { "rang" , "9002" } , new String [ ] { "loz" , "9674" } , new String [ ] { "spades" , "9824" } , new String [ ] { "clubs" , "9827" } , new String [ ] { "hearts" , "9829" } , new String [ ] { "diams" , "9830" } , new String [ ] { "OElig" , "338" } , new String [ ] { "oelig" , "339" } , new String [ ] { "Scaron" , "352" } , new String [ ] { "scaron" , "353" } , new String [ ] { "Yuml" , "376" } , new String [ ] { "circ" , "710" } , new String [ ] { "tilde" , "732" } , new String [ ] { "ensp" , "8194" } , new String [ ] { "emsp" , "8195" } , new String [ ] { "thinsp" , "8201" } , new String [ ] { "zwnj" , "8204" } , new String [ ] { "zwj" , "8205" } , new String [ ] { "lrm" , "8206" } , new String [ ] { "rlm" , "8207" } , new String [ ] { "ndash" , "8211" } , new String [ ] { "mdash" , "8212" } , new String [ ] { "lsquo" , "8216" } , new String [ ] { "rsquo" , "8217" } , new String [ ] { "sbquo" , "8218" } , new String [ ] { "ldquo" , "8220" } , new String [ ] { "rdquo" , "8221" } , new String [ ] { "bdquo" , "8222" } , new String [ ] { "dagger" , "8224" } , new String [ ] { "Dagger" , "8225" } , new String [ ] { "permil" , "8240" } , new String [ ] { "lsaquo" , "8249" } , new String [ ] { "rsaquo" , "8250" } , new String [ ] { "euro" , "8364" } } ; public static final Entities XML ; public static final Entities HTML32 ; public static final Entities HTML40 ; static void fillWithHtml40Entities ( Entities entities ) { } static interface EntityMap { void add ( String name , int value ) { } String name ( int value ) { } int value ( String name ) { } } static class PrimitiveEntityMap implements Entities . EntityMap { private Map mapNameToValue = new HashMap ( ) ; private IntHashMap mapValueToName = new IntHashMap ( ) ; public void add ( String name , int value ) { } public String name ( int value ) { } public int value ( String name ) { } } abstract static class MapIntMap implements Entities . EntityMap { protected Map mapNameToValue ; protected Map mapValueToName ; public void add ( String name , int value ) { } public String name ( int value ) { } public int value ( String name ) { } } static class HashEntityMap extends Entities . MapIntMap { public HashEntityMap ( ) { } } static class TreeEntityMap extends Entities . MapIntMap { public TreeEntityMap ( ) { } } static class LookupEntityMap extends Entities . PrimitiveEntityMap { private String [ ] lookupTable ; private int LOOKUP_TABLE_SIZE = 256 ; public String name ( int value ) { } private String [ ] lookupTable ( ) { } private void createLookupTable ( ) { } } static class ArrayEntityMap implements Entities . EntityMap { protected int growBy = 100 ; protected int size = 0 ; protected String [ ] names ; protected int [ ] values ; public ArrayEntityMap ( ) { } public ArrayEntityMap ( int growBy ) { } public void add ( String name , int value ) { } protected void ensureCapacity ( int capacity ) { } public String name ( int value ) { } public int value ( String name ) { } } static class BinaryEntityMap extends Entities . ArrayEntityMap { public BinaryEntityMap ( ) { } public BinaryEntityMap ( int growBy ) { } private int binarySearch ( int key ) { int low = 0 ; int high = ( size ) - 1 ; while ( low <= high ) { <START_BUG> int mid = ( low + high ) > > 1 ; <END_BUG> int midVal = values [ mid ] ; if ( midVal < key ) { low = mid + 1 ; } else if ( midVal > key ) { high = mid - 1 ; } else { return mid ; } } return - ( low + 1 ) ; } public void add ( String name , int value ) { } public String name ( int value ) { } } Entities . EntityMap map = new Entities . LookupEntityMap ( ) ; public void addEntities ( String [ ] [ ] entityArray ) { } public void addEntity ( String name , int value ) { } public String entityName ( int value ) { } public int entityValue ( String name ) { } public String escape ( String str ) { } public void escape ( Writer writer , String str ) throws IOException { } public String unescape ( String str ) { } private StringWriter createStringWriter ( String str ) { } public void unescape ( Writer writer , String str ) throws IOException { } private void doUnescape ( Writer writer , String str , int firstAmp ) throws IOException { } }

Fix:
int mid = ( low + high ) > > > 1 ;