Program: 90261
Project: 90261
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 RoaringBitmap add(RoaringBitmap rb,final int rangeStart,final int rangeEnd){
  if (rangeStart >= rangeEnd)   return rb.clone();
  final int hbStart=Util.toIntUnsigned(Util.highbits(rangeStart));
  final int lbStart=Util.toIntUnsigned(Util.lowbits(rangeStart));
  final int hbLast=Util.toIntUnsigned(Util.highbits(rangeEnd - 1));
  final int lbLast=Util.toIntUnsigned(Util.lowbits(rangeEnd - 1));
  RoaringBitmap answer=new RoaringBitmap();
  answer.highLowContainer.appendCopiesUntil(rb.highLowContainer,(short)hbStart);
  if (hbStart == hbLast) {
    final int i=rb.highLowContainer.getIndex((short)hbStart);
    final Container c=i >= 0 ? rb.highLowContainer.getContainerAtIndex(i).add(lbStart,lbLast + 1) : Container.rangeOfOnes(lbStart,lbLast + 1);
    answer.highLowContainer.append((short)hbStart,c);
    answer.highLowContainer.appendCopiesAfter(rb.highLowContainer,(short)hbLast);
    return answer;
  }
  int ifirst=rb.highLowContainer.getIndex((short)hbStart);
  int ilast=rb.highLowContainer.getIndex((short)hbLast);
{
    final Container c=ifirst >= 0 ? rb.highLowContainer.getContainerAtIndex(ifirst).add(lbStart,Util.maxLowBitAsInteger() + 1) : Container.rangeOfOnes(lbStart,Util.maxLowBitAsInteger() + 1);
    answer.highLowContainer.append((short)hbStart,c);
  }
  for (int hb=hbStart + 1; hb < hbLast; ++hb) {
    Container c=Container.rangeOfOnes(0,Util.maxLowBitAsInteger() + 1);
    answer.highLowContainer.append((short)hb,c);
  }
{
    final Container c=ilast >= 0 ? rb.highLowContainer.getContainerAtIndex(ilast).add(0,lbLast + 1) : Container.rangeOfOnes(0,lbLast + 1);
    answer.highLowContainer.append((short)hbLast,c);
  }
  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 RoaringBitmap add(RoaringBitmap rb,final int rangeStart,final int rangeEnd){
  if (rangeStart >= rangeEnd)   return rb.clone();
  final int hbStart=Util.toIntUnsigned(Util.highbits(rangeStart));
  final int lbStart=Util.toIntUnsigned(Util.lowbits(rangeStart));
  final int hbLast=Util.toIntUnsigned(Util.highbits(rangeEnd - 1));
  final int lbLast=Util.toIntUnsigned(Util.lowbits(rangeEnd - 1));
  RoaringBitmap answer=new RoaringBitmap();
  answer.highLowContainer.appendCopiesUntil(rb.highLowContainer,(short)hbStart);
  if (hbStart == hbLast) {
    final int i=rb.highLowContainer.getIndex((short)hbStart);
    final Container c=i >= 0 ? rb.highLowContainer.getContainerAtIndex(i).add(lbStart,lbLast + 1) : Container.rangeOfOnes(lbStart,lbLast + 1);
    answer.highLowContainer.append((short)hbStart,c);
    answer.highLowContainer.appendCopiesAfter(rb.highLowContainer,(short)hbLast);
    return answer;
  }
  int ifirst=rb.highLowContainer.getIndex((short)hbStart);
  int ilast=rb.highLowContainer.getIndex((short)hbLast);
{
    final Container c=ifirst >= 0 ? rb.highLowContainer.getContainerAtIndex(ifirst).add(lbStart,Util.maxLowBitAsInteger() + 1) : Container.rangeOfOnes(lbStart,Util.maxLowBitAsInteger() + 1);
    answer.highLowContainer.append((short)hbStart,c);
  }
  for (int hb=hbStart + 1; hb < hbLast; ++hb) {
    Container c=Container.rangeOfOnes(0,Util.maxLowBitAsInteger() + 1);
    answer.highLowContainer.append((short)hb,c);
  }
{
    final Container c=ilast >= 0 ? rb.highLowContainer.getContainerAtIndex(ilast).add(0,lbLast + 1) : Container.rangeOfOnes(0,lbLast + 1);
    answer.highLowContainer.append((short)hbLast,c);
  }
  answer.highLowContainer.appendCopiesAfter(rb.highLowContainer,(short)hbLast);
  return answer;
}