nus-yam/ex-repair huggingface dataset:
Program: 90376
Project: 90376
Buggy source:
public void clear(){
  this.nbKeys=0;
}

Fixed version (ground truth):
public void clear(){
  this.array=null;
  this.size=0;
}
Program: 90377
Project: 90377
Buggy source:
public int binarySearch(int begin,int end,short key){
  int low=begin;
  int high=end - 1;
  int ikey=Util.toIntUnsigned(key);
  while (low <= high) {
    int middleIndex=(low + high) >>> 1;
    int middleValue=Util.toIntUnsigned(array[middleIndex].key);
    if (middleValue < ikey)     low=middleIndex + 1;
 else     if (middleValue > ikey)     high=middleIndex - 1;
 else     return middleIndex;
  }
  return -(low + 1);
}

Fixed version (ground truth):
private int binarySearch(int begin,int end,short key){
  int low=begin;
  int high=end - 1;
  int ikey=Util.toIntUnsigned(key);
  while (low <= high) {
    int middleIndex=(low + high) >>> 1;
    int middleValue=Util.toIntUnsigned(array[middleIndex].key);
    if (middleValue < ikey)     low=middleIndex + 1;
 else     if (middleValue > ikey)     high=middleIndex - 1;
 else     return middleIndex;
  }
  return -(low + 1);
}
Program: 90378
Project: 90378
Buggy source:
public boolean remove(short key){
  int i=binarySearch(0,nbKeys,key);
  if (i >= 0) {
    removeAtIndex(i);
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean remove(short key){
  int i=binarySearch(0,size,key);
  if (i >= 0) {
    removeAtIndex(i);
    return true;
  }
  return false;
}
Program: 90379
Project: 90379
Buggy source:
public boolean ContainsKey(short x){
  return (binarySearch(0,nbKeys,x) >= 0);
}

Fixed version (ground truth):
public boolean ContainsKey(short x){
  return (binarySearch(0,size,x) >= 0);
}
Program: 90380
Project: 90380
Buggy source:
public void removeAtIndex(int i){
  System.arraycopy(array,i + 1,array,i,nbKeys - i - 1);
  nbKeys--;
}

Fixed version (ground truth):
public void removeAtIndex(int i){
  System.arraycopy(array,i + 1,array,i,size - i - 1);
  array[size - 1]=null;
  size--;
}
Program: 90381
Project: 90381
Buggy source:
public int size(){
  return this.nbKeys;
}

Fixed version (ground truth):
public int size(){
  return this.size;
}
Program: 90382
Project: 90382
Buggy source:
@Override public SpeedyArray clone() throws CloneNotSupportedException {
  SpeedyArray sa;
  sa=(SpeedyArray)super.clone();
  sa.array=Arrays.copyOf(this.array,this.nbKeys);
  sa.nbKeys=this.nbKeys;
  return sa;
}

Fixed version (ground truth):
@Override public SpeedyArray clone() throws CloneNotSupportedException {
  SpeedyArray sa;
  sa=(SpeedyArray)super.clone();
  sa.array=Arrays.copyOf(this.array,this.size);
  sa.size=this.size;
  return sa;
}
Program: 90383
Project: 90383
Buggy source:
/** 
 * Generating N sets of nbInts integers using Zipfian distribution.
 * @param N number of generated sets of integers
 * @param repeat number of repetitions
 */
public static void Tests(int N,int repeat,String path,int distribution){
  System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  zpf=new ZipfianDistribution();
  uniform=new UniformDataGenerator();
  cdg=new ClusteredDataGenerator();
  String distdir=null;
switch (distribution) {
case 0:
    distdir=path + File.separator + "String_Node_Str"+ CPU+ File.separator+ "String_Node_Str";
  break;
case 1:
distdir=path + File.separator + "String_Node_Str"+ CPU+ File.separator+ "String_Node_Str";
break;
case 2:
distdir=path + File.separator + "String_Node_Str"+ CPU+ File.separator+ "String_Node_Str";
break;
default :
System.out.println("String_Node_Str");
System.exit(0);
}
launchBenchmark(distribution,N,repeat,distdir,classic);
}

Fixed version (ground truth):
/** 
 * Generating N sets of nbInts integers using Zipfian distribution.
 * @param N number of generated sets of integers
 * @param repeat number of repetitions
 */
public static void Tests(int N,int repeat,String path,int distribution){
  System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  zpf=new ZipfianDistribution();
  uniform=new UniformDataGenerator();
  cdg=new ClusteredDataGenerator();
  String distdir=null;
  if (path != null) switch (distribution) {
case 0:
    distdir=path + File.separator + "String_Node_Str"+ CPU+ File.separator+ "String_Node_Str";
  break;
case 1:
distdir=path + File.separator + "String_Node_Str"+ CPU+ File.separator+ "String_Node_Str";
break;
case 2:
distdir=path + File.separator + "String_Node_Str"+ CPU+ File.separator+ "String_Node_Str";
break;
default :
System.out.println("String_Node_Str");
System.exit(0);
}
launchBenchmark(distribution,N,repeat,distdir,classic);
}
Program: 90386
Project: 90386
Buggy source:
/** 
 * Generating N sets of nbInts integers using Zipfian distribution.
 * @param N number of generated sets of integers
 * @param repeat number of repetitions
 */
public static void Tests(int N,int repeat,String path,int distribution){
  System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  zpf=new ZipfianDistribution();
  uniform=new UniformDataGenerator();
  cdg=new ClusteredDataGenerator();
  String distdir=null;
switch (distribution) {
case 0:
    distdir=path + File.separator + "String_Node_Str"+ CPU+ File.separator+ "String_Node_Str";
  break;
case 1:
distdir=path + File.separator + "String_Node_Str"+ CPU+ File.separator+ "String_Node_Str";
break;
case 2:
distdir=path + File.separator + "String_Node_Str"+ CPU+ File.separator+ "String_Node_Str";
break;
default :
System.out.println("String_Node_Str");
System.exit(0);
}
launchBenchmark(distribution,N,repeat,distdir,classic);
}

Fixed version (ground truth):
/** 
 * Generating N sets of nbInts integers using Zipfian distribution.
 * @param N number of generated sets of integers
 * @param repeat number of repetitions
 */
public static void Tests(int N,int repeat,String path,int distribution){
  System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  zpf=new ZipfianDistribution();
  uniform=new UniformDataGenerator();
  cdg=new ClusteredDataGenerator();
  String distdir=null;
  if (path != null) switch (distribution) {
case 0:
    distdir=path + File.separator + "String_Node_Str"+ CPU+ File.separator+ "String_Node_Str";
  break;
case 1:
distdir=path + File.separator + "String_Node_Str"+ CPU+ File.separator+ "String_Node_Str";
break;
case 2:
distdir=path + File.separator + "String_Node_Str"+ CPU+ File.separator+ "String_Node_Str";
break;
default :
System.out.println("String_Node_Str");
System.exit(0);
}
launchBenchmark(distribution,N,repeat,distdir,classic);
}
Program: 90387
Project: 90387
Buggy source:
public static BitmapContainer getBitmapContainer(){
  if (Bbuffer.isEmpty())   return new BitmapContainer();
  return Bbuffer.remove(Bbuffer.size() - 1);
}

Fixed version (ground truth):
/** 
 * Warning: the BitmapContainer won't be initialized as empty.
 * @return a BitmapContainer
 */
public static BitmapContainer getBitmapContainer(){
  if (Bbuffer.isEmpty())   return new BitmapContainer();
  return Bbuffer.remove(Bbuffer.size() - 1);
}
Program: 90388
Project: 90388
Buggy source:
public static BitmapContainer transformToBitmapContainer(ArrayContainer ac){
  BitmapContainer bc=Bbuffer.isEmpty() ? new BitmapContainer() : Bbuffer.remove(Bbuffer.size() - 1);
  bc.loadData(ac);
  putBackInStore(ac);
  return bc;
}

Fixed version (ground truth):
public static BitmapContainer transformToBitmapContainer(ArrayContainer ac){
  BitmapContainer bc;
  if (Bbuffer.isEmpty())   bc=new BitmapContainer();
 else {
    bc=Bbuffer.remove(Bbuffer.size() - 1);
    bc.clear();
  }
  bc.loadData(ac);
  putBackInStore(ac);
  return bc;
}
Program: 90390
Project: 90390
Buggy source:
/** 
 * running time is in O(n) time if insert is not in order.
 */
@Override public Container add(short x){
  if ((cardinality == 0) || (Util.toIntUnsigned(x) > Util.toIntUnsigned(content[cardinality - 1]))) {
    if (cardinality == content.length) {
      BitmapContainer a=ContainerFactory.transformToBitmapContainer(this);
      a.add(x);
      return a;
    }
    content[cardinality++]=x;
    return this;
  }
  int loc=Util.unsigned_binarySearch(content,0,cardinality,x);
  if (loc < 0) {
    if (cardinality == content.length) {
      BitmapContainer a=ContainerFactory.transformToBitmapContainer(this);
      a.add(x);
      return a;
    }
    System.arraycopy(content,-loc - 1,content,-loc,cardinality + loc + 1);
    content[-loc - 1]=x;
    ++cardinality;
  }
  return this;
}

Fixed version (ground truth):
/** 
 * running time is in O(n) time if insert is not in order.
 */
@Override public Container add(final short x){
  if ((cardinality == 0) || (Util.toIntUnsigned(x) > Util.toIntUnsigned(content[cardinality - 1]))) {
    if (cardinality == content.length) {
      BitmapContainer a=ContainerFactory.transformToBitmapContainer(this);
      a.add(x);
      return a;
    }
    content[cardinality++]=x;
    return this;
  }
  int loc=Util.unsigned_binarySearch(content,0,cardinality,x);
  if (loc < 0) {
    if (cardinality == content.length) {
      BitmapContainer a=ContainerFactory.transformToBitmapContainer(this);
      a.add(x);
      return a;
    }
    System.arraycopy(content,-loc - 1,content,-loc,cardinality + loc + 1);
    content[-loc - 1]=x;
    ++cardinality;
  }
  return this;
}
Program: 90391
Project: 90391
Buggy source:
public Container or(ArrayContainer value2){
  ArrayContainer value1=this;
  int tailleAC=value1.getCardinality() + value2.getCardinality();
  final int desiredcapacity=tailleAC > 65535 ? 65535 : tailleAC;
  ArrayContainer answer=ContainerFactory.getArrayContainer();
  if (answer.content.length < desiredcapacity)   answer.content=new short[desiredcapacity];
  answer.cardinality=Util.unsigned_union2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  if (answer.cardinality > DEFAULTMAXSIZE)   return ContainerFactory.transformToBitmapContainer(answer);
  return answer;
}

Fixed version (ground truth):
public Container or(final ArrayContainer value2){
  final ArrayContainer value1=this;
  int tailleAC=value1.getCardinality() + value2.getCardinality();
  final int desiredcapacity=tailleAC > 65535 ? 65535 : tailleAC;
  ArrayContainer answer=ContainerFactory.getArrayContainer();
  if (answer.content.length < desiredcapacity)   answer.content=new short[desiredcapacity];
  answer.cardinality=Util.unsigned_union2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  if (answer.cardinality > DEFAULTMAXSIZE)   return ContainerFactory.transformToBitmapContainer(answer);
  return answer;
}
Program: 90392
Project: 90392
Buggy source:
public void loadData(BitmapContainer bitmapContainer){
  if (content.length < bitmapContainer.cardinality)   content=new short[bitmapContainer.cardinality];
  this.cardinality=bitmapContainer.cardinality;
  int pos=0;
  for (int i=bitmapContainer.nextSetBit(0); i >= 0; i=bitmapContainer.nextSetBit(i + 1)) {
    content[pos++]=(short)i;
  }
  if (pos != this.cardinality)   throw new RuntimeException("String_Node_Str" + pos + "String_Node_Str"+ this.cardinality);
}

Fixed version (ground truth):
public void loadData(final BitmapContainer bitmapContainer){
  if (content.length < bitmapContainer.cardinality)   content=new short[bitmapContainer.cardinality];
  this.cardinality=bitmapContainer.cardinality;
  int pos=0;
  for (int i=bitmapContainer.nextSetBit(0); i >= 0; i=bitmapContainer.nextSetBit(i + 1)) {
    content[pos++]=(short)i;
  }
  if (pos != this.cardinality)   throw new RuntimeException("String_Node_Str" + pos + "String_Node_Str"+ this.cardinality);
}
Program: 90393
Project: 90393
Buggy source:
@Override public boolean contains(short x){
  return Util.unsigned_binarySearch(content,0,cardinality,x) >= 0;
}

Fixed version (ground truth):
@Override public boolean contains(final short x){
  return Util.unsigned_binarySearch(content,0,cardinality,x) >= 0;
}
Program: 90394
Project: 90394
Buggy source:
public ArrayContainer and(ArrayContainer value2){
  ArrayContainer value1=this;
  final int desiredcapacity=Math.min(value1.getCardinality(),value2.getCardinality());
  ArrayContainer answer=ContainerFactory.getArrayContainer();
  if (answer.content.length < desiredcapacity)   answer.content=new short[desiredcapacity];
  answer.cardinality=Util.unsigned_intersect2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  return answer;
}

Fixed version (ground truth):
public ArrayContainer and(final ArrayContainer value2){
  ArrayContainer value1=this;
  final int desiredcapacity=Math.min(value1.getCardinality(),value2.getCardinality());
  ArrayContainer answer=ContainerFactory.getArrayContainer();
  if (answer.content.length < desiredcapacity)   answer.content=new short[desiredcapacity];
  answer.cardinality=Util.unsigned_intersect2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  return answer;
}
Program: 90395
Project: 90395
Buggy source:
@Override public ArrayContainer clone(){
  try {
    ArrayContainer x=(ArrayContainer)super.clone();
    x.cardinality=this.cardinality;
    x.content=Arrays.copyOf(content,content.length);
    return x;
  }
 catch (  CloneNotSupportedException e) {
    throw new java.lang.RuntimeException();
  }
}

Fixed version (ground truth):
@Override public ArrayContainer clone(){
  try {
    final ArrayContainer x=(ArrayContainer)super.clone();
    x.cardinality=this.cardinality;
    x.content=Arrays.copyOf(content,content.length);
    return x;
  }
 catch (  CloneNotSupportedException e) {
    throw new java.lang.RuntimeException();
  }
}
Program: 90396
Project: 90396
Buggy source:
public Container xor(ArrayContainer value2){
  ArrayContainer value1=this;
  final int desiredcapacity=Math.min(value1.getCardinality() + value2.getCardinality(),65536);
  ArrayContainer answer=ContainerFactory.getArrayContainer();
  if (answer.content.length < desiredcapacity)   answer.content=new short[desiredcapacity];
  answer.cardinality=Util.unsigned_exclusiveunion2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  if (answer.cardinality > DEFAULTMAXSIZE)   return ContainerFactory.transformToBitmapContainer(answer);
  return answer;
}

Fixed version (ground truth):
public Container xor(final ArrayContainer value2){
  final ArrayContainer value1=this;
  final int desiredcapacity=Math.min(value1.getCardinality() + value2.getCardinality(),65536);
  ArrayContainer answer=ContainerFactory.getArrayContainer();
  if (answer.content.length < desiredcapacity)   answer.content=new short[desiredcapacity];
  answer.cardinality=Util.unsigned_exclusiveunion2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  if (answer.cardinality > DEFAULTMAXSIZE)   return ContainerFactory.transformToBitmapContainer(answer);
  return answer;
}
Program: 90397
Project: 90397
Buggy source:
@Override public Container add(short i){
  final int x=Util.toIntUnsigned(i);
  final long previous=bitmap[x / 64];
  if (previous != (bitmap[x / 64]|=(1l << x)))   ++cardinality;
  return this;
}

Fixed version (ground truth):
@Override public Container add(final short i){
  final int x=Util.toIntUnsigned(i);
  final long previous=bitmap[x / 64];
  if (previous != (bitmap[x / 64]|=(1l << x)))   ++cardinality;
  return this;
}
Program: 90398
Project: 90398
Buggy source:
public Container or(BitmapContainer value2){
  BitmapContainer answer=ContainerFactory.getBitmapContainer();
  for (int k=0; k < answer.bitmap.length; ++k) {
    answer.bitmap[k]=this.bitmap[k] | value2.bitmap[k];
    answer.cardinality+=Long.bitCount(answer.bitmap[k]);
  }
  return answer;
}

Fixed version (ground truth):
public Container or(final BitmapContainer value2){
  final BitmapContainer answer=ContainerFactory.getBitmapContainer();
  for (int k=0; k < answer.bitmap.length; ++k) {
    answer.bitmap[k]=this.bitmap[k] | value2.bitmap[k];
    answer.cardinality+=Long.bitCount(answer.bitmap[k]);
  }
  return answer;
}
Program: 90399
Project: 90399
Buggy source:
public short nextUnsetBit(int i){
  int x=i / 64;
  long w=~bitmap[x];
  w>>>=i;
  if (w != 0) {
    return (short)(i + Long.numberOfTrailingZeros(w));
  }
  ++x;
  for (; x < bitmap.length; ++x) {
    if (bitmap[x] != ~0) {
      return (short)(x * 64 + Long.numberOfTrailingZeros(~bitmap[x]));
    }
  }
  return -1;
}

Fixed version (ground truth):
public short nextUnsetBit(final int i){
  int x=i / 64;
  long w=~bitmap[x];
  w>>>=i;
  if (w != 0) {
    return (short)(i + Long.numberOfTrailingZeros(w));
  }
  ++x;
  for (; x < bitmap.length; ++x) {
    if (bitmap[x] != ~0) {
      return (short)(x * 64 + Long.numberOfTrailingZeros(~bitmap[x]));
    }
  }
  return -1;
}
Program: 90400
Project: 90400
Buggy source:
public void loadData(ArrayContainer arrayContainer){
  this.cardinality=arrayContainer.cardinality;
  for (int k=0; k < arrayContainer.cardinality; ++k) {
    final short x=arrayContainer.content[k];
    bitmap[Util.toIntUnsigned(x) / 64]|=(1l << x);
  }
}

Fixed version (ground truth):
public void loadData(final ArrayContainer arrayContainer){
  this.cardinality=arrayContainer.cardinality;
  for (int k=0; k < arrayContainer.cardinality; ++k) {
    final short x=arrayContainer.content[k];
    bitmap[Util.toIntUnsigned(x) / 64]|=(1l << x);
  }
}
Program: 90401
Project: 90401
Buggy source:
public int nextSetBit(int i){
  int x=i / 64;
  if (x >= bitmap.length)   return -1;
  long w=bitmap[x];
  w>>>=i;
  if (w != 0) {
    return i + Long.numberOfTrailingZeros(w);
  }
  ++x;
  for (; x < bitmap.length; ++x) {
    if (bitmap[x] != 0) {
      return x * 64 + Long.numberOfTrailingZeros(bitmap[x]);
    }
  }
  return -1;
}

Fixed version (ground truth):
public int nextSetBit(final int i){
  int x=i / 64;
  if (x >= bitmap.length)   return -1;
  long w=bitmap[x];
  w>>>=i;
  if (w != 0) {
    return i + Long.numberOfTrailingZeros(w);
  }
  ++x;
  for (; x < bitmap.length; ++x) {
    if (bitmap[x] != 0) {
      return x * 64 + Long.numberOfTrailingZeros(bitmap[x]);
    }
  }
  return -1;
}
Program: 90402
Project: 90402
Buggy source:
@Override public boolean contains(short i){
  final int x=Util.toIntUnsigned(i);
  return (bitmap[x / 64] & (1l << x)) != 0;
}

Fixed version (ground truth):
@Override public boolean contains(final short i){
  final int x=Util.toIntUnsigned(i);
  return (bitmap[x / 64] & (1l << x)) != 0;
}
Program: 90403
Project: 90403
Buggy source:
public ArrayContainer and(ArrayContainer value2){
  ArrayContainer answer=ContainerFactory.getArrayContainer();
  if (answer.content.length < value2.content.length)   answer.content=new short[value2.content.length];
  for (int k=0; k < value2.getCardinality(); ++k)   if (this.contains(value2.content[k]))   answer.content[answer.cardinality++]=value2.content[k];
  return answer;
}

Fixed version (ground truth):
public ArrayContainer and(final ArrayContainer value2){
  final ArrayContainer answer=ContainerFactory.getArrayContainer();
  if (answer.content.length < value2.content.length)   answer.content=new short[value2.content.length];
  for (int k=0; k < value2.getCardinality(); ++k)   if (this.contains(value2.content[k]))   answer.content[answer.cardinality++]=value2.content[k];
  return answer;
}
Program: 90404
Project: 90404
Buggy source:
@Override public BitmapContainer clone(){
  try {
    BitmapContainer x=(BitmapContainer)super.clone();
    x.cardinality=this.cardinality;
    System.arraycopy(this.bitmap,0,x.bitmap,0,x.bitmap.length);
    return x;
  }
 catch (  CloneNotSupportedException e) {
    throw new java.lang.RuntimeException();
  }
}

Fixed version (ground truth):
@Override public BitmapContainer clone(){
  try {
    final BitmapContainer x=(BitmapContainer)super.clone();
    x.cardinality=this.cardinality;
    x.bitmap=Arrays.copyOf(this.bitmap,this.bitmap.length);
    return x;
  }
 catch (  CloneNotSupportedException e) {
    throw new java.lang.RuntimeException();
  }
}
Program: 90405
Project: 90405
Buggy source:
public Container xor(BitmapContainer value2){
  BitmapContainer answer=ContainerFactory.getBitmapContainer();
  for (int k=0; k < answer.bitmap.length; ++k) {
    answer.bitmap[k]=this.bitmap[k] ^ value2.bitmap[k];
    answer.cardinality+=Long.bitCount(answer.bitmap[k]);
  }
  if (answer.cardinality <= ArrayContainer.DEFAULTMAXSIZE)   return ContainerFactory.transformToArrayContainer(answer);
  return answer;
}

Fixed version (ground truth):
public Container xor(BitmapContainer value2){
  final BitmapContainer answer=ContainerFactory.getBitmapContainer();
  for (int k=0; k < answer.bitmap.length; ++k) {
    answer.bitmap[k]=this.bitmap[k] ^ value2.bitmap[k];
    answer.cardinality+=Long.bitCount(answer.bitmap[k]);
  }
  if (answer.cardinality <= ArrayContainer.DEFAULTMAXSIZE)   return ContainerFactory.transformToArrayContainer(answer);
  return answer;
}
Program: 90406
Project: 90406
Buggy source:
public static BitmapContainer transformToBitmapContainer(ArrayContainer ac){
  BitmapContainer bc;
  if (Bbuffer.isEmpty())   bc=new BitmapContainer();
 else {
    bc=Bbuffer.remove(Bbuffer.size() - 1);
    bc.clear();
  }
  bc.loadData(ac);
  putBackInStore(ac);
  return bc;
}

Fixed version (ground truth):
public static BitmapContainer transformToBitmapContainer(ArrayContainer ac){
  BitmapContainer bc=Bbuffer.isEmpty() ? new BitmapContainer() : Bbuffer.remove(Bbuffer.size() - 1);
  bc.loadData(ac);
  putBackInStore(ac);
  return bc;
}
Program: 90407
Project: 90407
Buggy source:
/** 
 * running time is in O(n) time if insert is not in order.
 */
@Override public Container add(short x){
  if ((cardinality == 0) || (Util.toIntUnsigned(x) > content[cardinality - 1])) {
    if (cardinality == content.length) {
      BitmapContainer a=ContainerFactory.transformToBitmapContainer(this);
      a.add(x);
      return a;
    }
    content[cardinality++]=x;
    return this;
  }
  int loc=Util.unsigned_binarySearch(content,0,cardinality,x);
  if (loc < 0) {
    if (cardinality == content.length) {
      BitmapContainer a=ContainerFactory.transformToBitmapContainer(this);
      a.add(x);
      return a;
    }
    System.arraycopy(content,-loc - 1,content,-loc,cardinality + loc + 1);
    content[-loc - 1]=x;
    ++cardinality;
  }
  return this;
}

Fixed version (ground truth):
/** 
 * running time is in O(n) time if insert is not in order.
 */
@Override public Container add(short x){
  if ((cardinality == 0) || (Util.toIntUnsigned(x) > Util.toIntUnsigned(content[cardinality - 1]))) {
    if (cardinality == content.length) {
      BitmapContainer a=ContainerFactory.transformToBitmapContainer(this);
      a.add(x);
      return a;
    }
    content[cardinality++]=x;
    return this;
  }
  int loc=Util.unsigned_binarySearch(content,0,cardinality,x);
  if (loc < 0) {
    if (cardinality == content.length) {
      BitmapContainer a=ContainerFactory.transformToBitmapContainer(this);
      a.add(x);
      return a;
    }
    System.arraycopy(content,-loc - 1,content,-loc,cardinality + loc + 1);
    content[-loc - 1]=x;
    ++cardinality;
  }
  return this;
}
Program: 90408
Project: 90408
Buggy source:
/** 
 * set the value to "true", whether it already appears on not.
 */
public void set(int x){
  short hb=Util.highbits(x);
  Container z=highlowcontainer.get(hb);
  if (z != null) {
    Container z2=z.add(Util.lowbits(x));
    if (z2 != z) {
      highlowcontainer.put(hb,z2);
    }
  }
 else {
    ArrayContainer newac=ContainerFactory.getArrayContainer();
    highlowcontainer.put(hb,newac.add(Util.lowbits(x)));
  }
}

Fixed version (ground truth):
/** 
 * set the value to "true", whether it already appears on not.
 */
public void set(int x){
  final short hb=Util.highbits(x);
  Container z=highlowcontainer.get(hb);
  if (z != null) {
    Container z2=z.add(Util.lowbits(x));
    if (z2 != z) {
      highlowcontainer.put(hb,z2);
    }
  }
 else {
    ArrayContainer newac=ContainerFactory.getArrayContainer();
    highlowcontainer.put(hb,newac.add(Util.lowbits(x)));
  }
}
Program: 90409
Project: 90409
Buggy source:
public boolean contains(int x){
  short hb=Util.highbits(x);
  if (highlowcontainer.containsKey(hb)) {
    Container C=highlowcontainer.get(hb);
    return C.contains(Util.lowbits(x));
  }
  return false;
}

Fixed version (ground truth):
public boolean contains(int x){
  final short hb=Util.highbits(x);
  if (highlowcontainer.containsKey(hb)) {
    Container C=highlowcontainer.get(hb);
    return C.contains(Util.lowbits(x));
  }
  return false;
}
Program: 90410
Project: 90410
Buggy source:
public Container xor(BitmapContainer value2){
  BitmapContainer answer=new BitmapContainer();
  for (int k=0; k < answer.bitmap.length; ++k) {
    answer.bitmap[k]=this.bitmap[k] ^ value2.bitmap[k];
    if (answer.bitmap[k] != 0)     answer.cardinality+=Long.bitCount(answer.bitmap[k]);
  }
  if (answer.cardinality <= ArrayContainer.DEFAULTMAXSIZE)   return ContainerFactory.transformToArrayContainer(answer);
  return answer;
}

Fixed version (ground truth):
public Container xor(BitmapContainer value2){
  BitmapContainer answer=new BitmapContainer();
  for (int k=0; k < answer.bitmap.length; ++k) {
    answer.bitmap[k]=this.bitmap[k] ^ value2.bitmap[k];
    answer.cardinality+=Long.bitCount(answer.bitmap[k]);
  }
  if (answer.cardinality <= ArrayContainer.DEFAULTMAXSIZE)   return ContainerFactory.transformToArrayContainer(answer);
  return answer;
}
Program: 90411
Project: 90411
Buggy source:
@Test public void ArrayContainerCardinalityTest(){
  ArrayContainer ac=new ArrayContainer();
  for (short k=0; k < 100; ++k) {
    ac.add(k);
    Assert.assertEquals(ac.getCardinality(),k + 1);
  }
  for (short k=0; k < 100; ++k) {
    ac.add(k);
    Assert.assertEquals(ac.getCardinality(),100);
  }
}

Fixed version (ground truth):
@Test public void ArrayContainerCardinalityTest(){
  ArrayContainer ac=new ArrayContainer();
  for (short k=0; k < 100; ++k) {
    ac.add(k);
    Assert.assertEquals(ac.getCardinality(),k + 1);
  }
  for (short k=0; k < 100; ++k) {
    ac.add(k);
    Assert.assertEquals(ac.getCardinality(),100);
  }
  for (short k=0; k < 100; ++k) {
    ac.remove(k);
    Assert.assertEquals(ac.getCardinality(),100 - k - 1);
  }
}
Program: 90412
Project: 90412
Buggy source:
@Test public void BitmapContainerCardinalityTest(){
  BitmapContainer ac=new BitmapContainer();
  for (short k=0; k < 100; ++k) {
    ac.add(k);
    Assert.assertEquals(ac.getCardinality(),k + 1);
  }
  for (short k=0; k < 100; ++k) {
    ac.add(k);
    Assert.assertEquals(ac.getCardinality(),100);
  }
}

Fixed version (ground truth):
@Test public void BitmapContainerCardinalityTest(){
  BitmapContainer ac=new BitmapContainer();
  for (short k=0; k < 100; ++k) {
    ac.add(k);
    Assert.assertEquals(ac.getCardinality(),k + 1);
  }
  for (short k=0; k < 100; ++k) {
    ac.add(k);
    Assert.assertEquals(ac.getCardinality(),100);
  }
  Assert.assertEquals(ac.getCardinality(),100);
  for (short k=0; k < 100; ++k) {
    Container z=ac.remove(k);
    if (z instanceof ArrayContainer) {
      ac=new BitmapContainer();
      ac.loadData((ArrayContainer)z);
    }
    Assert.assertEquals(ac.getCardinality(),100 - k - 1);
  }
}
Program: 90413
Project: 90413
Buggy source:
@Test public void cardinalityTest(){
  System.out.println("String_Node_Str");
  final int N=1024;
  for (int gap=7; gap < 100000; gap*=10) {
    for (int offset=2; offset <= 1024; offset*=2) {
      System.out.println("String_Node_Str" + gap + "String_Node_Str"+ offset);
      RoaringBitmap rb=new RoaringBitmap();
      for (int k=0; k < N; k++) {
        rb.add(k * gap);
        Assert.assertEquals(rb.getCardinality(),k + 1);
      }
      Assert.assertEquals(rb.getCardinality(),N);
      for (int k=0; k < N; k++) {
        rb.add(k * gap);
        Assert.assertEquals(rb.getCardinality(),N);
      }
      RoaringBitmap rb2=new RoaringBitmap();
      for (int k=0; k < N; k++) {
        rb2.add(k * gap * offset);
        Assert.assertEquals(rb2.getCardinality(),k + 1);
      }
      Assert.assertEquals(rb2.getCardinality(),N);
      for (int k=0; k < N; k++) {
        rb2.add(k * gap * offset);
        Assert.assertEquals(rb2.getCardinality(),N);
      }
      Assert.assertEquals(RoaringBitmap.and(rb,rb2).getCardinality(),N / offset);
      Assert.assertEquals(RoaringBitmap.or(rb,rb2).getCardinality(),2 * N - N / offset);
      Assert.assertEquals(RoaringBitmap.xor(rb,rb2).getCardinality(),2 * N - 2 * N / offset);
    }
  }
}

Fixed version (ground truth):
@Test public void cardinalityTest(){
  System.out.println("String_Node_Str");
  final int N=1024;
  for (int gap=7; gap < 100000; gap*=10) {
    for (int offset=2; offset <= 1024; offset*=2) {
      System.out.println("String_Node_Str" + gap + "String_Node_Str"+ offset);
      RoaringBitmap rb=new RoaringBitmap();
      for (int k=0; k < N; k++) {
        rb.add(k * gap);
        Assert.assertEquals(rb.getCardinality(),k + 1);
      }
      Assert.assertEquals(rb.getCardinality(),N);
      for (int k=0; k < N; k++) {
        rb.add(k * gap);
        Assert.assertEquals(rb.getCardinality(),N);
      }
      RoaringBitmap rb2=new RoaringBitmap();
      for (int k=0; k < N; k++) {
        rb2.add(k * gap * offset);
        Assert.assertEquals(rb2.getCardinality(),k + 1);
      }
      Assert.assertEquals(rb2.getCardinality(),N);
      for (int k=0; k < N; k++) {
        rb2.add(k * gap * offset);
        Assert.assertEquals(rb2.getCardinality(),N);
      }
      Assert.assertEquals(RoaringBitmap.and(rb,rb2).getCardinality(),N / offset);
      Assert.assertEquals(RoaringBitmap.or(rb,rb2).getCardinality(),2 * N - N / offset);
      Assert.assertEquals(RoaringBitmap.xor(rb,rb2).getCardinality(),2 * N - 2 * N / offset);
      for (int k=0; k < N; k++) {
        Assert.assertTrue(rb.contains(k * gap));
        rb.remove(k * gap);
        Assert.assertFalse(rb.contains(k * gap));
        Assert.assertEquals(rb.getCardinality(),N - k - 1);
      }
      for (int k=0; k < N; k++) {
        Assert.assertTrue(rb2.contains(k * gap * offset));
        rb2.remove(k * gap * offset);
        Assert.assertFalse(rb2.contains(k * gap * offset));
        Assert.assertEquals(rb2.getCardinality(),N - k - 1);
      }
    }
  }
}
Program: 90414
Project: 90414
Buggy source:
public Container or(ArrayContainer value2){
  ArrayContainer value1=this;
  int tailleAC=value1.getCardinality() + value2.getCardinality();
  final int desiredcapacity=tailleAC > 65535 ? 65535 : tailleAC;
  ArrayContainer answer=new ArrayContainer(desiredcapacity);
  answer.cardinality=Util.unsigned_union2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  if (answer.cardinality > DEFAULTMAXSIZE)   return ContainerFactory.transformToBitmapContainer(answer);
  return answer;
}

Fixed version (ground truth):
public Container or(ArrayContainer value2){
  ArrayContainer value1=this;
  int tailleAC=value1.getCardinality() + value2.getCardinality();
  final int desiredcapacity=tailleAC > 65535 ? 65535 : tailleAC;
  ArrayContainer answer=ContainerFactory.getArrayContainer();
  if (answer.content.length < desiredcapacity)   answer.content=new short[desiredcapacity];
  answer.cardinality=Util.unsigned_union2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  if (answer.cardinality > DEFAULTMAXSIZE)   return ContainerFactory.transformToBitmapContainer(answer);
  return answer;
}
Program: 90415
Project: 90415
Buggy source:
public ArrayContainer and(ArrayContainer value2){
  ArrayContainer value1=this;
  final int desiredcapacity=Math.min(value1.getCardinality(),value2.getCardinality());
  ArrayContainer answer=new ArrayContainer(desiredcapacity);
  answer.cardinality=Util.unsigned_intersect2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  return answer;
}

Fixed version (ground truth):
public ArrayContainer and(ArrayContainer value2){
  ArrayContainer value1=this;
  final int desiredcapacity=Math.min(value1.getCardinality(),value2.getCardinality());
  ArrayContainer answer=ContainerFactory.getArrayContainer();
  if (answer.content.length < desiredcapacity)   answer.content=new short[desiredcapacity];
  answer.cardinality=Util.unsigned_intersect2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  return answer;
}
Program: 90416
Project: 90416
Buggy source:
public Container xor(ArrayContainer value2){
  ArrayContainer value1=this;
  final int desiredcapacity=Math.min(value1.getCardinality() + value2.getCardinality(),65536);
  ArrayContainer answer=new ArrayContainer(desiredcapacity);
  answer.cardinality=Util.unsigned_exclusiveunion2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  if (answer.cardinality > DEFAULTMAXSIZE)   return ContainerFactory.transformToBitmapContainer(answer);
  return answer;
}

Fixed version (ground truth):
public Container xor(ArrayContainer value2){
  ArrayContainer value1=this;
  final int desiredcapacity=Math.min(value1.getCardinality() + value2.getCardinality(),65536);
  ArrayContainer answer=ContainerFactory.getArrayContainer();
  if (answer.content.length < desiredcapacity)   answer.content=new short[desiredcapacity];
  answer.cardinality=Util.unsigned_exclusiveunion2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  if (answer.cardinality > DEFAULTMAXSIZE)   return ContainerFactory.transformToBitmapContainer(answer);
  return answer;
}
Program: 90417
Project: 90417
Buggy source:
public Container or(BitmapContainer value2){
  BitmapContainer answer=new BitmapContainer();
  for (int k=0; k < answer.bitmap.length; ++k) {
    answer.bitmap[k]=this.bitmap[k] | value2.bitmap[k];
    answer.cardinality+=Long.bitCount(answer.bitmap[k]);
  }
  return answer;
}

Fixed version (ground truth):
public Container or(BitmapContainer value2){
  BitmapContainer answer=ContainerFactory.getBitmapContainer();
  for (int k=0; k < answer.bitmap.length; ++k) {
    answer.bitmap[k]=this.bitmap[k] | value2.bitmap[k];
    answer.cardinality+=Long.bitCount(answer.bitmap[k]);
  }
  return answer;
}
Program: 90418
Project: 90418
Buggy source:
public ArrayContainer and(ArrayContainer value2){
  ArrayContainer answer=new ArrayContainer();
  for (int k=0; k < value2.getCardinality(); ++k)   if (this.contains(value2.content[k]))   answer.content[answer.cardinality++]=value2.content[k];
  return answer;
}

Fixed version (ground truth):
public ArrayContainer and(ArrayContainer value2){
  ArrayContainer answer=ContainerFactory.getArrayContainer();
  if (answer.content.length < value2.content.length)   answer.content=new short[value2.content.length];
  for (int k=0; k < value2.getCardinality(); ++k)   if (this.contains(value2.content[k]))   answer.content[answer.cardinality++]=value2.content[k];
  return answer;
}
Program: 90419
Project: 90419
Buggy source:
@Override public BitmapContainer clone(){
  try {
    BitmapContainer x=(BitmapContainer)super.clone();
    x.cardinality=this.cardinality;
    x.bitmap=Arrays.copyOf(bitmap,bitmap.length);
    return x;
  }
 catch (  CloneNotSupportedException e) {
    throw new java.lang.RuntimeException();
  }
}

Fixed version (ground truth):
@Override public BitmapContainer clone(){
  try {
    BitmapContainer x=(BitmapContainer)super.clone();
    x.cardinality=this.cardinality;
    System.arraycopy(this.bitmap,0,x.bitmap,0,x.bitmap.length);
    return x;
  }
 catch (  CloneNotSupportedException e) {
    throw new java.lang.RuntimeException();
  }
}
Program: 90420
Project: 90420
Buggy source:
public Container xor(BitmapContainer value2){
  BitmapContainer answer=new BitmapContainer();
  for (int k=0; k < answer.bitmap.length; ++k) {
    answer.bitmap[k]=this.bitmap[k] ^ value2.bitmap[k];
    answer.cardinality+=Long.bitCount(answer.bitmap[k]);
  }
  if (answer.cardinality <= ArrayContainer.DEFAULTMAXSIZE)   return ContainerFactory.transformToArrayContainer(answer);
  return answer;
}

Fixed version (ground truth):
public Container xor(BitmapContainer value2){
  BitmapContainer answer=ContainerFactory.getBitmapContainer();
  for (int k=0; k < answer.bitmap.length; ++k) {
    answer.bitmap[k]=this.bitmap[k] ^ value2.bitmap[k];
    answer.cardinality+=Long.bitCount(answer.bitmap[k]);
  }
  if (answer.cardinality <= ArrayContainer.DEFAULTMAXSIZE)   return ContainerFactory.transformToArrayContainer(answer);
  return answer;
}
Program: 90421
Project: 90421
Buggy source:
public Container or(ArrayContainer value2){
  ArrayContainer value1=this;
  ArrayContainer answer=new ArrayContainer();
  answer.cardinality=Util.union2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  if (answer.cardinality >= 1024)   return new BitmapContainer(answer);
  return answer;
}

Fixed version (ground truth):
public Container or(ArrayContainer value2){
  ArrayContainer value1=this;
  final int desiredcapacity=Math.min(value1.getCardinality() + value2.getCardinality(),65536);
  ArrayContainer answer=new ArrayContainer(desiredcapacity);
  answer.cardinality=Util.union2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  if (answer.cardinality >= 1024)   return new BitmapContainer(answer);
  return answer;
}
Program: 90422
Project: 90422
Buggy source:
public ArrayContainer and(ArrayContainer value2){
  ArrayContainer value1=this;
  ArrayContainer answer=new ArrayContainer();
  answer.cardinality=Util.localintersect2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  return answer;
}

Fixed version (ground truth):
public ArrayContainer and(ArrayContainer value2){
  ArrayContainer value1=this;
  final int desiredcapacity=Math.min(value1.getCardinality(),value2.getCardinality());
  ArrayContainer answer=new ArrayContainer(desiredcapacity);
  answer.cardinality=Util.localintersect2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  return answer;
}
Program: 90423
Project: 90423
Buggy source:
public Container xor(ArrayContainer value2){
  ArrayContainer value1=this;
  ArrayContainer answer=new ArrayContainer();
  answer.cardinality=Util.ExclusiveUnion2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  if (answer.cardinality >= 1024)   return new BitmapContainer(answer);
  return answer;
}

Fixed version (ground truth):
public Container xor(ArrayContainer value2){
  ArrayContainer value1=this;
  final int desiredcapacity=Math.min(value1.getCardinality() + value2.getCardinality(),65536);
  ArrayContainer answer=new ArrayContainer(desiredcapacity);
  answer.cardinality=Util.ExclusiveUnion2by2(value1.content,value1.getCardinality(),value2.content,value2.getCardinality(),answer.content);
  if (answer.cardinality >= 1024)   return new BitmapContainer(answer);
  return answer;
}
Program: 90424
Project: 90424
Buggy source:
public ArrayContainer(){
}

Fixed version (ground truth):
public ArrayContainer(){
  content=new short[2048];
}
Program: 90425
Project: 90425
Buggy source:
@Override public Container add(short i){
  if (!contains(i)) {
    bitmap[Math.abs(i / 64)]|=(1l << (i % 64));
    ++cardinality;
  }
  return this;
}

Fixed version (ground truth):
@Override public Container add(short i){
  if (!contains(i)) {
    bitmap[toIntUnsigned(i) / 64]|=(1l << (i % 64));
    ++cardinality;
  }
  return this;
}
Program: 90426
Project: 90426
Buggy source:
public Container or(BitmapContainer value2){
  BitmapContainer value1=this;
  BitmapContainer answer=new BitmapContainer();
  for (int k=0; k < answer.bitmap.length; ++k) {
    answer.bitmap[k]=value1.bitmap[k] | value2.bitmap[k];
    answer.cardinality+=Long.bitCount(answer.bitmap[k]);
  }
  if (cardinality < 1024)   return new ArrayContainer(answer);
  return answer;
}

Fixed version (ground truth):
public Container or(BitmapContainer value2){
  BitmapContainer value1=this;
  BitmapContainer answer=new BitmapContainer();
  for (int k=0; k < answer.bitmap.length; ++k) {
    answer.bitmap[k]=value1.bitmap[k] | value2.bitmap[k];
    answer.cardinality+=Long.bitCount(answer.bitmap[k]);
  }
  if (answer.cardinality < 1024)   return new ArrayContainer(answer);
  return answer;
}
Program: 90427
Project: 90427
Buggy source:
public short nextSetBit(int i){
  int x=i / 64;
  long w=bitmap[x];
  w>>>=(i % 64);
  if (w != 0) {
    return (short)(i + Long.numberOfTrailingZeros(w));
  }
  ++x;
  for (; x < bitmap.length; ++x) {
    if (bitmap[x] != 0) {
      return (short)(x * 64 + Long.numberOfTrailingZeros(bitmap[x]));
    }
  }
  return -1;
}

Fixed version (ground truth):
public int nextSetBit(int i){
  int x=i / 64;
  if (x >= bitmap.length)   return -1;
  long w=bitmap[x];
  w>>>=(i % 64);
  if (w != 0) {
    return i + Long.numberOfTrailingZeros(w);
  }
  ++x;
  for (; x < bitmap.length; ++x) {
    if (bitmap[x] != 0) {
      return x * 64 + Long.numberOfTrailingZeros(bitmap[x]);
    }
  }
  return -1;
}
Program: 90428
Project: 90428
Buggy source:
@Override public boolean contains(short i){
  return (bitmap[Math.abs(i / 64)] & (1l << (i % 64))) != 0;
}

Fixed version (ground truth):
@Override public boolean contains(short i){
  return (bitmap[toIntUnsigned(i) / 64] & (1l << (i % 64))) != 0;
}
Program: 90429
Project: 90429
Buggy source:
public BitmapContainer(ArrayContainer arrayContainer){
  this.cardinality=arrayContainer.cardinality;
  for (  short x : arrayContainer.content)   bitmap[Math.abs(x) / 64]|=(1l << (x % 64));
}

Fixed version (ground truth):
public BitmapContainer(ArrayContainer arrayContainer){
  this.cardinality=arrayContainer.cardinality;
  for (int k=0; k < arrayContainer.cardinality; ++k) {
    final short x=arrayContainer.content[k];
    bitmap[toIntUnsigned(x) / 64]|=(1l << x % 64);
  }
}
Program: 90430
Project: 90430
Buggy source:
@Override public String toString(){
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str");
  int i=this.nextSetBit(0);
  do {
    sb.append(i);
    i=this.nextSetBit(i + 1);
    if (i >= 0)     sb.append("String_Node_Str");
  }
 while (i >= 0);
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuffer sb=new StringBuffer();
  int counter=0;
  sb.append("String_Node_Str");
  int i=this.nextSetBit(0);
  while (i >= 0) {
    sb.append(i);
    ++counter;
    i=this.nextSetBit(i + 1);
    if (i >= 0)     sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  System.out.println("String_Node_Str" + cardinality + "String_Node_Str"+ counter);
  return sb.toString();
}
Program: 90431
Project: 90431
Buggy source:
public int getCardinality(){
  int size=0;
  final Iterator<Entry<Short,Container>> p1=this.highlowcontainer.entrySet().iterator();
  Entry<Short,Container> s;
  do {
    s=p1.next();
    size+=this.highlowcontainer.get(s.getKey()).getCardinality();
  }
 while (p1.hasNext());
  return size;
}

Fixed version (ground truth):
public int getCardinality(){
  int size=0;
  final Iterator<Entry<Short,Container>> p1=this.highlowcontainer.entrySet().iterator();
  Entry<Short,Container> s;
  while (p1.hasNext()) {
    s=p1.next();
    size+=this.highlowcontainer.get(s.getKey()).getCardinality();
  }
  return size;
}
Program: 90432
Project: 90432
Buggy source:
public void getIntegers(int array[]){
  array=new int[this.getCardinality()];
  int pos=0;
  final Iterator<Entry<Short,Container>> p1=this.highlowcontainer.entrySet().iterator();
  Entry<Short,Container> s;
  do {
    s=p1.next();
    if (s.getValue() instanceof ArrayContainer)     for (int i=0; i < s.getValue().getCardinality(); i++)     array[pos++]=(16 << s.getKey().shortValue()) | ((ArrayContainer)s.getValue()).content[i];
 else     if (s.getValue() instanceof BitmapContainer)     for (int i=((BitmapContainer)s.getValue()).nextSetBit(0); i >= 0; i=((BitmapContainer)s.getValue()).nextSetBit(i + 1))     array[pos++]=(16 << s.getKey().shortValue()) | i;
  }
 while (p1.hasNext());
}

Fixed version (ground truth):
public int[] getIntegers(){
  int[] array=new int[this.getCardinality()];
  int pos=0;
  final Iterator<Entry<Short,Container>> p1=this.highlowcontainer.entrySet().iterator();
  Entry<Short,Container> s;
  while (p1.hasNext()) {
    s=p1.next();
    if (s.getValue() instanceof ArrayContainer)     for (int i=0; i < s.getValue().getCardinality(); i++)     array[pos++]=(16 << s.getKey().shortValue()) | ((ArrayContainer)s.getValue()).content[i];
 else     if (s.getValue() instanceof BitmapContainer)     for (int i=((BitmapContainer)s.getValue()).nextSetBit(0); i >= 0; i=((BitmapContainer)s.getValue()).nextSetBit(i + 1))     array[pos++]=(16 << s.getKey().shortValue()) | i;
  }
  return array;
}
Program: 90433
Project: 90433
Buggy source:
private StatusLogger(final String name,final MessageFactory messageFactory){
  super(name,messageFactory);
  this.logger=new SimpleLogger("String_Node_Str",Level.ERROR,false,true,false,false,System.getProperty(STATUS_DATE_FORMAT,Strings.EMPTY),messageFactory,PROPS,System.err);
  this.listenersLevel=Level.toLevel(DEFAULT_STATUS_LEVEL,Level.WARN).intLevel();
  if (isDebugPropertyEnabled()) {
    logger.setLevel(Level.TRACE);
  }
}

Fixed version (ground truth):
private StatusLogger(final String name,final MessageFactory messageFactory){
  super(name,messageFactory);
  final String dateFormat=PROPS.getStringProperty(STATUS_DATE_FORMAT,Strings.EMPTY);
  final boolean showDateTime=!Strings.isEmpty(dateFormat);
  this.logger=new SimpleLogger("String_Node_Str",Level.ERROR,false,true,showDateTime,false,dateFormat,messageFactory,PROPS,System.err);
  this.listenersLevel=Level.toLevel(DEFAULT_STATUS_LEVEL,Level.WARN).intLevel();
  if (isDebugPropertyEnabled()) {
    logger.setLevel(Level.TRACE);
  }
}
Program: 90435
Project: 90435
Buggy source:
private static Clock createClock(){
  final String userRequest=PropertiesUtil.getProperties().getStringProperty(PROPERTY_NAME);
  if (userRequest == null) {
    LOGGER.trace("String_Node_Str");
    return new SystemClock();
  }
  Supplier<Clock> specified=aliases().get(userRequest);
  if (specified != null) {
    LOGGER.trace("String_Node_Str",userRequest);
    return specified.get();
  }
  try {
    final Clock result=Loader.newCheckedInstanceOf(userRequest,Clock.class);
    LOGGER.trace("String_Node_Str",result.getClass().getName());
    return result;
  }
 catch (  final Exception e) {
    final String fmt="String_Node_Str";
    LOGGER.error(fmt,userRequest,e);
    return new SystemClock();
  }
}

Fixed version (ground truth):
private static Clock createClock(){
  final String userRequest=PropertiesUtil.getProperties().getStringProperty(PROPERTY_NAME);
  if (userRequest == null) {
    LOGGER.trace("String_Node_Str");
    return logSupportedPrecision(new SystemClock());
  }
  Supplier<Clock> specified=aliases().get(userRequest);
  if (specified != null) {
    LOGGER.trace("String_Node_Str",userRequest);
    return logSupportedPrecision(specified.get());
  }
  try {
    final Clock result=Loader.newCheckedInstanceOf(userRequest,Clock.class);
    LOGGER.trace("String_Node_Str",result.getClass().getName());
    return logSupportedPrecision(result);
  }
 catch (  final Exception e) {
    final String fmt="String_Node_Str";
    LOGGER.error(fmt,userRequest,e);
    return logSupportedPrecision(new SystemClock());
  }
}
Program: 90436
Project: 90436
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + epochSecond + "String_Node_Str"+ nanoOfSecond+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  final StringBuilder sb=new StringBuilder(64);
  formatTo(sb);
  return sb.toString();
}