Program: 90263
Project: 90263
Buggy source:
/** 
 * Generate a new bitmap with  all integers in [rangeStart,rangeEnd) added.
 * @param rb initial bitmap (will not be modified)
 * @param rangeStart inclusive beginning of range
 * @param rangeEnd   exclusive ending of range
 */
public static MutableRoaringBitmap add(MutableRoaringBitmap rb,final int rangeStart,final int rangeEnd){
  if (rangeStart >= rangeEnd)   return rb.clone();
  final int hbStart=BufferUtil.toIntUnsigned(BufferUtil.highbits(rangeStart));
  final int lbStart=BufferUtil.toIntUnsigned(BufferUtil.lowbits(rangeStart));
  final int hbLast=BufferUtil.toIntUnsigned(BufferUtil.highbits(rangeEnd - 1));
  final int lbLast=BufferUtil.toIntUnsigned(BufferUtil.lowbits(rangeEnd - 1));
  MutableRoaringBitmap answer=new MutableRoaringBitmap();
  ((MutableRoaringArray)answer.highLowContainer).appendCopiesUntil(rb.highLowContainer,(short)hbStart);
  if (hbStart == hbLast) {
    final int i=rb.highLowContainer.getIndex((short)hbStart);
    final MappeableContainer c=i >= 0 ? rb.highLowContainer.getContainerAtIndex(i).add(lbStart,lbLast + 1) : MappeableContainer.rangeOfOnes(lbStart,lbLast + 1);
    ((MutableRoaringArray)answer.highLowContainer).append((short)hbStart,c);
    ((MutableRoaringArray)answer.highLowContainer).appendCopiesAfter(rb.highLowContainer,(short)hbLast);
    return answer;
  }
  int ifirst=rb.highLowContainer.getIndex((short)hbStart);
  int ilast=rb.highLowContainer.getIndex((short)hbLast);
{
    final MappeableContainer c=ifirst >= 0 ? rb.highLowContainer.getContainerAtIndex(ifirst).add(lbStart,BufferUtil.maxLowBitAsInteger() + 1) : MappeableContainer.rangeOfOnes(lbStart,BufferUtil.maxLowBitAsInteger() + 1);
    ((MutableRoaringArray)answer.highLowContainer).append((short)hbStart,c);
  }
  for (int hb=hbStart + 1; hb < hbLast; ++hb) {
    MappeableContainer c=MappeableContainer.rangeOfOnes(0,BufferUtil.maxLowBitAsInteger() + 1);
    ((MutableRoaringArray)answer.highLowContainer).append((short)hb,c);
  }
{
    final MappeableContainer c=ilast >= 0 ? rb.highLowContainer.getContainerAtIndex(ilast).add(0,lbLast + 1) : MappeableContainer.rangeOfOnes(0,lbLast + 1);
    ((MutableRoaringArray)answer.highLowContainer).append((short)hbLast,c);
  }
  ((MutableRoaringArray)answer.highLowContainer).appendCopiesAfter(rb.highLowContainer,(short)hbLast);
  return answer;
}

Fixed version (ground truth):
/** 
 * Generate a new bitmap with  all integers in [rangeStart,rangeEnd) added.
 * @param rb initial bitmap (will not be modified)
 * @param rangeStart inclusive beginning of range
 * @param rangeEnd   exclusive ending of range
 * @return the bitmap
 */
public static MutableRoaringBitmap add(MutableRoaringBitmap rb,final int rangeStart,final int rangeEnd){
  if (rangeStart >= rangeEnd)   return rb.clone();
  final int hbStart=BufferUtil.toIntUnsigned(BufferUtil.highbits(rangeStart));
  final int lbStart=BufferUtil.toIntUnsigned(BufferUtil.lowbits(rangeStart));
  final int hbLast=BufferUtil.toIntUnsigned(BufferUtil.highbits(rangeEnd - 1));
  final int lbLast=BufferUtil.toIntUnsigned(BufferUtil.lowbits(rangeEnd - 1));
  MutableRoaringBitmap answer=new MutableRoaringBitmap();
  ((MutableRoaringArray)answer.highLowContainer).appendCopiesUntil(rb.highLowContainer,(short)hbStart);
  if (hbStart == hbLast) {
    final int i=rb.highLowContainer.getIndex((short)hbStart);
    final MappeableContainer c=i >= 0 ? rb.highLowContainer.getContainerAtIndex(i).add(lbStart,lbLast + 1) : MappeableContainer.rangeOfOnes(lbStart,lbLast + 1);
    ((MutableRoaringArray)answer.highLowContainer).append((short)hbStart,c);
    ((MutableRoaringArray)answer.highLowContainer).appendCopiesAfter(rb.highLowContainer,(short)hbLast);
    return answer;
  }
  int ifirst=rb.highLowContainer.getIndex((short)hbStart);
  int ilast=rb.highLowContainer.getIndex((short)hbLast);
{
    final MappeableContainer c=ifirst >= 0 ? rb.highLowContainer.getContainerAtIndex(ifirst).add(lbStart,BufferUtil.maxLowBitAsInteger() + 1) : MappeableContainer.rangeOfOnes(lbStart,BufferUtil.maxLowBitAsInteger() + 1);
    ((MutableRoaringArray)answer.highLowContainer).append((short)hbStart,c);
  }
  for (int hb=hbStart + 1; hb < hbLast; ++hb) {
    MappeableContainer c=MappeableContainer.rangeOfOnes(0,BufferUtil.maxLowBitAsInteger() + 1);
    ((MutableRoaringArray)answer.highLowContainer).append((short)hb,c);
  }
{
    final MappeableContainer c=ilast >= 0 ? rb.highLowContainer.getContainerAtIndex(ilast).add(0,lbLast + 1) : MappeableContainer.rangeOfOnes(0,lbLast + 1);
    ((MutableRoaringArray)answer.highLowContainer).append((short)hbLast,c);
  }
  ((MutableRoaringArray)answer.highLowContainer).appendCopiesAfter(rb.highLowContainer,(short)hbLast);
  return answer;
}