nus-yam/ex-repair huggingface dataset:
Program: 40967
Project: 40967
Buggy source:
/** 
 * Convert a JVM encoded type name to a readable type name.
 * @param jvmType a String containing a type name in JVM internal format.
 * @return the same type name in readable (source code) format.
 */
public static String jvmToReadableType(String jvmType){
  StringBuffer readable=new StringBuffer();
  int numberOfDimensions=0;
  char prefix=jvmType.charAt(0);
  while (prefix == '[') {
    numberOfDimensions++;
    prefix=jvmType.charAt(numberOfDimensions);
  }
  if (prefix == 'V') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'B') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'C') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'D') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'F') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'I') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'J') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'S') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'Z') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'L') {
    readable.append(jvmType.substring(numberOfDimensions + 1,jvmType.length()));
    readable=new StringBuffer(slashToDot(readable.toString()));
    readable=new StringBuffer(dollarToDot(readable.toString()));
  }
  for (int i=0; i < numberOfDimensions; ++i) {
    readable.append("String_Node_Str");
  }
  return readable.toString();
}

Fixed version (ground truth):
/** 
 * Convert a JVM encoded type name to a readable type name.
 * @param jvmType a String containing a type name in JVM internal format.
 * @return the same type name in readable (source code) format.
 */
public static String jvmToReadableType(String jvmType) throws IllegalArgumentException {
  StringBuffer readable=new StringBuffer();
  int numberOfDimensions=0;
  if (jvmType.length() == 0) {
    throw new IllegalArgumentException("String_Node_Str" + jvmType);
  }
  char prefix=jvmType.charAt(0);
  while (prefix == '[') {
    numberOfDimensions++;
    prefix=jvmType.charAt(numberOfDimensions);
  }
  if (prefix == 'V') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'B') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'C') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'D') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'F') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'I') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'J') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'S') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'Z') {
    readable.append("String_Node_Str");
  }
 else   if (prefix == 'L') {
    readable.append(jvmType.substring(numberOfDimensions + 1,jvmType.length()));
    readable=new StringBuffer(slashToDot(readable.toString()));
    readable=new StringBuffer(dollarToDot(readable.toString()));
  }
  for (int i=0; i < numberOfDimensions; ++i) {
    readable.append("String_Node_Str");
  }
  return readable.toString();
}
Program: 40968
Project: 40968
Buggy source:
/** 
 * Allocate a fresh label. This must be called during a pass and not during code emission.
 */
public int allocateLabel(){
  verifyState(DURING_PASS);
  return nextLabel++;
}

Fixed version (ground truth):
/** 
 * Allocate a fresh label. This must be called during a pass and not during code emission.
 */
public int allocateLabel() throws IllegalArgumentException {
  verifyState(DURING_PASS);
  return nextLabel++;
}
Program: 40971
Project: 40971
Buggy source:
/** 
 * @return the name of the Class at constant pool item i, in JVM format (e.g.,java/lang/Object)
 */
public String getCPClass(int i) throws InvalidClassFileException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_Class) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  String s=cpItems[i];
  if (s == null) {
    try {
      s=getCPUtf8(getUShort(offset + 1));
    }
 catch (    IllegalArgumentException ex) {
      throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
    }
    cpItems[i]=s;
  }
  return s;
}

Fixed version (ground truth):
/** 
 * @return the name of the Class at constant pool item i, in JVM format (e.g.,java/lang/Object)
 */
public String getCPClass(int i) throws InvalidClassFileException, IllegalArgumentException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_Class) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  String s=cpItems[i];
  if (s == null) {
    try {
      s=getCPUtf8(getUShort(offset + 1));
    }
 catch (    IllegalArgumentException ex) {
      throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
    }
    cpItems[i]=s;
  }
  return s;
}
Program: 40972
Project: 40972
Buggy source:
/** 
 * @return the value of the Double at constant pool item i
 */
public double getCPDouble(int i) throws InvalidClassFileException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_Double) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  return getDouble(offset + 1);
}

Fixed version (ground truth):
/** 
 * @return the value of the Double at constant pool item i
 */
public double getCPDouble(int i) throws InvalidClassFileException, IllegalArgumentException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_Double) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  return getDouble(offset + 1);
}
Program: 40973
Project: 40973
Buggy source:
/** 
 * @return the type part of the FieldRef, MethodRef, or InterfaceMethodRef atconstant pool item i, in JVM format (e.g., I, Z, or Ljava/lang/Object;)
 */
public String getCPRefType(int i) throws InvalidClassFileException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || !isRef(getByte(offset))) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  try {
    return getCPNATType(getUShort(offset + 3));
  }
 catch (  IllegalArgumentException ex) {
    throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * @return the type part of the FieldRef, MethodRef, or InterfaceMethodRef atconstant pool item i, in JVM format (e.g., I, Z, or Ljava/lang/Object;)
 */
public String getCPRefType(int i) throws InvalidClassFileException, IllegalArgumentException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || !isRef(getByte(offset))) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  try {
    return getCPNATType(getUShort(offset + 3));
  }
 catch (  IllegalArgumentException ex) {
    throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
  }
}
Program: 40974
Project: 40974
Buggy source:
/** 
 * @return the value of the Long at constant pool item i
 */
public long getCPLong(int i) throws InvalidClassFileException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_Long) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  return getLong(offset + 1);
}

Fixed version (ground truth):
/** 
 * @return the value of the Long at constant pool item i
 */
public long getCPLong(int i) throws InvalidClassFileException, IllegalArgumentException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_Long) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  return getLong(offset + 1);
}
Program: 40975
Project: 40975
Buggy source:
/** 
 * @return the name part of the NameAndType at constant pool item i
 */
public String getCPNATName(int i) throws InvalidClassFileException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_NameAndType) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  try {
    return getCPUtf8(getUShort(offset + 1));
  }
 catch (  IllegalArgumentException ex) {
    throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * @return the name part of the NameAndType at constant pool item i
 */
public String getCPNATName(int i) throws InvalidClassFileException, IllegalArgumentException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_NameAndType) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  try {
    return getCPUtf8(getUShort(offset + 1));
  }
 catch (  IllegalArgumentException ex) {
    throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
  }
}
Program: 40976
Project: 40976
Buggy source:
/** 
 * @return the value of the Integer at constant pool item i
 */
public int getCPInt(int i) throws InvalidClassFileException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_Integer) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  return getInt(offset + 1);
}

Fixed version (ground truth):
/** 
 * @return the value of the Integer at constant pool item i
 */
public int getCPInt(int i) throws InvalidClassFileException, IllegalArgumentException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_Integer) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  return getInt(offset + 1);
}
Program: 40977
Project: 40977
Buggy source:
/** 
 * @return the size of the constant pool data in the raw class file buffer
 */
public int getRawSize(){
  return cpOffsets[cpOffsets.length - 1] - cpOffsets[1];
}

Fixed version (ground truth):
/** 
 * @return the size of the constant pool data in the raw class file buffer
 */
public int getRawSize() throws IllegalStateException {
  if (cpOffsets.length < 2) {
    throw new IllegalStateException();
  }
  return cpOffsets[cpOffsets.length - 1] - cpOffsets[1];
}
Program: 40978
Project: 40978
Buggy source:
/** 
 * @return the type part of the NameAndType at constant pool item i, in JVMformat (e.g., I, Z, or Ljava/lang/Object;)
 */
public String getCPNATType(int i) throws InvalidClassFileException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_NameAndType) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  try {
    return getCPUtf8(getUShort(offset + 3));
  }
 catch (  IllegalArgumentException ex) {
    throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * @return the type part of the NameAndType at constant pool item i, in JVMformat (e.g., I, Z, or Ljava/lang/Object;)
 */
public String getCPNATType(int i) throws InvalidClassFileException, IllegalArgumentException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_NameAndType) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  try {
    return getCPUtf8(getUShort(offset + 3));
  }
 catch (  IllegalArgumentException ex) {
    throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
  }
}
Program: 40979
Project: 40979
Buggy source:
/** 
 * @return the name part of the FieldRef, MethodRef, or InterfaceMethodRef atconstant pool item i
 */
public String getCPRefName(int i) throws InvalidClassFileException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || !isRef(getByte(offset))) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  try {
    return getCPNATName(getUShort(offset + 3));
  }
 catch (  IllegalArgumentException ex) {
    throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * @return the name part of the FieldRef, MethodRef, or InterfaceMethodRef atconstant pool item i
 */
public String getCPRefName(int i) throws InvalidClassFileException, IllegalArgumentException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || !isRef(getByte(offset))) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  try {
    return getCPNATName(getUShort(offset + 3));
  }
 catch (  IllegalArgumentException ex) {
    throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
  }
}
Program: 40980
Project: 40980
Buggy source:
/** 
 * @return the type of constant pool item i, or 0 if i is an unused constantpool item
 */
public byte getItemType(int i){
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0) {
    return 0;
  }
 else {
    return getByte(offset);
  }
}

Fixed version (ground truth):
/** 
 * @return the type of constant pool item i, or 0 if i is an unused constantpool item
 */
public byte getItemType(int i) throws IllegalArgumentException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0) {
    return 0;
  }
 else {
    return getByte(offset);
  }
}
Program: 40981
Project: 40981
Buggy source:
/** 
 * @return the String at constant pool item i
 */
public String getCPString(int i) throws InvalidClassFileException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_String) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  String s=cpItems[i];
  if (s == null) {
    try {
      s=getCPUtf8(getUShort(offset + 1));
    }
 catch (    IllegalArgumentException ex) {
      throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
    }
    cpItems[i]=s;
  }
  return s;
}

Fixed version (ground truth):
/** 
 * @return the String at constant pool item i
 */
public String getCPString(int i) throws InvalidClassFileException, IllegalArgumentException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_String) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  String s=cpItems[i];
  if (s == null) {
    try {
      s=getCPUtf8(getUShort(offset + 1));
    }
 catch (    IllegalArgumentException ex) {
      throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
    }
    cpItems[i]=s;
  }
  return s;
}
Program: 40982
Project: 40982
Buggy source:
/** 
 * @return the name of the class part of the FieldRef, MethodRef, orInterfaceMethodRef at constant pool item i
 */
public String getCPRefClass(int i) throws InvalidClassFileException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || !isRef(getByte(offset))) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  try {
    return getCPClass(getUShort(offset + 1));
  }
 catch (  IllegalArgumentException ex) {
    throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * @return the name of the class part of the FieldRef, MethodRef, orInterfaceMethodRef at constant pool item i
 */
public String getCPRefClass(int i) throws InvalidClassFileException, IllegalArgumentException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || !isRef(getByte(offset))) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  try {
    return getCPClass(getUShort(offset + 1));
  }
 catch (  IllegalArgumentException ex) {
    throw new InvalidClassFileException(offset,"String_Node_Str" + i + "String_Node_Str"+ ex.getMessage());
  }
}
Program: 40983
Project: 40983
Buggy source:
/** 
 * @return the value of the Float at constant pool item i
 */
public float getCPFloat(int i) throws InvalidClassFileException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_Float) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  return getFloat(offset + 1);
}

Fixed version (ground truth):
/** 
 * @return the value of the Float at constant pool item i
 */
public float getCPFloat(int i) throws InvalidClassFileException, IllegalArgumentException {
  if (i < 1 || i >= cpItems.length) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  int offset=cpOffsets[i];
  if (offset == 0 || getByte(offset) != CONSTANT_Float) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
  }
  return getFloat(offset + 1);
}
Program: 40984
Project: 40984
Buggy source:
/** 
 * @return the offset of the constant pool data in the raw class file buffer
 */
public int getRawOffset(){
  return cpOffsets[1];
}

Fixed version (ground truth):
/** 
 * @return the offset of the constant pool data in the raw class file buffer
 */
public int getRawOffset() throws IllegalStateException {
  if (cpOffsets.length < 2) {
    throw new IllegalStateException();
  }
  return cpOffsets[1];
}
Program: 40985
Project: 40985
Buggy source:
public int copyInto(byte[] buf,int offset){
  verify();
  ClassWriter.setUShort(buf,offset,attrID);
  ClassWriter.setInt(buf,offset + 2,2);
  ClassWriter.setUShort(buf,offset + 6,index);
  return offset + 8;
}

Fixed version (ground truth):
public int copyInto(byte[] buf,int offset) throws IllegalArgumentException {
  verify();
  ClassWriter.setUShort(buf,offset,attrID);
  ClassWriter.setInt(buf,offset + 2,2);
  ClassWriter.setUShort(buf,offset + 6,index);
  return offset + 8;
}
Program: 40986
Project: 40986
Buggy source:
/** 
 * Set the index of the constant pool item holding the constant value.
 */
public void setValueCPIndex(int index){
  if (index < 1 || index > 0xFFFF) {
    throw new IllegalArgumentException("String_Node_Str" + index);
  }
  this.index=index;
}

Fixed version (ground truth):
/** 
 * Set the index of the constant pool item holding the constant value.
 */
public void setValueCPIndex(int index) throws IllegalArgumentException {
  if (index < 1 || index > 0xFFFF) {
    throw new IllegalArgumentException("String_Node_Str" + index);
  }
  this.index=index;
}
Program: 40987
Project: 40987
Buggy source:
/** 
 * Add an integer value to this set.
 * @param i
 * @return true iff the value of this changes.
 */
public boolean add(int i){
  boolean pr=primaryImpl.add(i);
  boolean sr=secondaryImpl.add(i);
  Assertions._assert(pr == sr);
  return pr;
}

Fixed version (ground truth):
/** 
 * Add an integer value to this set.
 * @param i
 * @return true iff the value of this changes.
 */
public boolean add(int i){
  boolean pr=primaryImpl.add(i);
  boolean sr=secondaryImpl.add(i);
  if (pr != sr) {
    Assertions._assert(pr == sr,"String_Node_Str" + i + "String_Node_Str"+ primaryImpl+ "String_Node_Str"+ pr+ "String_Node_Str"+ i+ "String_Node_Str"+ secondaryImpl+ "String_Node_Str"+ sr);
  }
  return pr;
}
Program: 40988
Project: 40988
Buggy source:
/** 
 */
public int size(){
  Assertions._assert(primaryImpl.size() == secondaryImpl.size());
  return primaryImpl.size();
}

Fixed version (ground truth):
/** 
 */
public int size(){
  if (primaryImpl.size() != secondaryImpl.size()) {
    Assertions._assert(primaryImpl.size() == secondaryImpl.size(),"String_Node_Str" + primaryImpl.size() + "String_Node_Str"+ primaryImpl+ "String_Node_Str"+ "String_Node_Str"+ secondaryImpl.size()+ "String_Node_Str"+ secondaryImpl);
  }
  return primaryImpl.size();
}
Program: 40989
Project: 40989
Buggy source:
void growCapacity(float fraction){
  expand(offset,(int)fraction * (bits.length << LOG_BITS_PER_UNIT));
}

Fixed version (ground truth):
void growCapacity(float fraction){
  expand(offset,(int)(fraction * (bits.length << LOG_BITS_PER_UNIT)));
}
Program: 40990
Project: 40990
Buggy source:
/** 
 * Add an integer value to this set.
 * @param i integer to add
 * @return true iff the value of this changes.
 */
public boolean add(int i){
  if (!contains(i)) {
    if (densePart != null && densePart.getOffset() <= i && densePart.length() > i) {
      densePart.set(i);
    }
 else {
      sparsePart.add(i);
      fixAfterSparseInsert();
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Add an integer value to this set.
 * @param i integer to add
 * @return true iff the value of this changes.
 */
public boolean add(int i){
  if (densePart != null && inDenseRange(i)) {
    if (!densePart.get(i)) {
      densePart.set(i);
      assertDisjoint();
      return true;
    }
  }
 else   if (!sparsePart.contains(i)) {
    sparsePart.add(i);
    assertDisjoint();
    fixAfterSparseInsert();
    return true;
  }
  return false;
}
Program: 40991
Project: 40991
Buggy source:
/** 
 * @param i
 * @return true iff this set contains integer i
 */
public boolean contains(int i){
  return sparsePart.contains(i) || (densePart != null && densePart.contains(i));
}

Fixed version (ground truth):
/** 
 * @param i
 * @return true iff this set contains integer i
 */
public boolean contains(int i){
  if (densePart != null && inDenseRange(i)) {
    return densePart.contains(i);
  }
 else {
    return sparsePart.contains(i);
  }
}
Program: 40993
Project: 40993
Buggy source:
public void set(int x,Object value){
  if (Assertions.verifyAssertions) {
    Assertions._assert(x >= 0);
  }
  maxIndex=Math.max(maxIndex,x);
  if (value == null) {
    if (x >= store.length) {
      return;
    }
 else {
      store[x]=value;
    }
  }
 else {
    ensureCapacity(x);
    store[x]=value;
  }
}

Fixed version (ground truth):
public void set(int x,T value){
  if (Assertions.verifyAssertions) {
    Assertions._assert(x >= 0);
  }
  maxIndex=Math.max(maxIndex,x);
  if (value == null) {
    if (x >= store.length) {
      return;
    }
 else {
      store[x]=value;
    }
  }
 else {
    ensureCapacity(x);
    store[x]=value;
  }
}
Program: 40994
Project: 40994
Buggy source:
public Module asModule(){
  Assertions.UNREACHABLE();
  return null;
}

Fixed version (ground truth):
public Module asModule() throws UnimplementedError {
  Assertions.UNREACHABLE("String_Node_Str");
  return null;
}
Program: 40995
Project: 40995
Buggy source:
/** 
 * @param gen the intset of facts which are gen'ned by this flow function
 */
private VectorGenFlowFunction(SparseIntSet gen){
  this.gen=gen;
  if (Assertions.verifyAssertions) {
    Assertions._assert(gen.contains(0));
  }
}

Fixed version (ground truth):
/** 
 * @param gen the intset of facts which are gen'ned by this flow function
 */
private VectorGenFlowFunction(SparseIntSet gen){
  this.gen=gen;
}
Program: 40996
Project: 40996
Buggy source:
/** 
 * @param cmd
 * @throws WalaException
 */
protected Process spawnProcess(String cmd) throws WalaException {
  System.out.println("String_Node_Str" + cmd);
  String[] env=getEnv() == null ? null : buildEnv(getEnv());
  try {
    Process p=Runtime.getRuntime().exec(cmd,env,getWorkingDir());
    return p;
  }
 catch (  IOException e) {
    e.printStackTrace();
    throw new WalaException("String_Node_Str" + getClass());
  }
}

Fixed version (ground truth):
/** 
 * @param cmd
 * @throws WalaException
 */
protected Process spawnProcess(String cmd) throws WalaException, IllegalArgumentException {
  if (cmd == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  System.out.println("String_Node_Str" + cmd);
  String[] env=getEnv() == null ? null : buildEnv(getEnv());
  try {
    Process p=Runtime.getRuntime().exec(cmd,env,getWorkingDir());
    return p;
  }
 catch (  IOException e) {
    e.printStackTrace();
    throw new WalaException("String_Node_Str" + getClass());
  }
}
Program: 40997
Project: 40997
Buggy source:
public TypeReference getConstantType(Object S){
  Class<? extends Object> key=(S == null) ? null : S.getClass();
  if (Assertions.verifyAssertions && !constantTypes.containsKey(key)) {
    Assertions._assert(constantTypes.containsKey(key),"String_Node_Str" + S + "String_Node_Str"+ key);
  }
  return constantTypes.get(key);
}

Fixed version (ground truth):
/** 
 * TODO: what is this and why is it here?
 */
public TypeReference getConstantType(Object S){
  Class<? extends Object> key=(S == null) ? null : S.getClass();
  if (Assertions.verifyAssertions && !constantTypes.containsKey(key)) {
    Assertions._assert(constantTypes.containsKey(key),"String_Node_Str" + S + "String_Node_Str"+ key);
  }
  return constantTypes.get(key);
}
Program: 40998
Project: 40998
Buggy source:
public PointsToSetVariable(){
  super();
  this.pointerKey=null;
}

Fixed version (ground truth):
public PointsToSetVariable(PointerKey key){
  super();
  if (Assertions.verifyAssertions) {
    Assertions._assert(key != null);
  }
  this.pointerKey=key;
}
Program: 41000
Project: 41000
Buggy source:
public int getDef(int i){
  Assertions.UNREACHABLE();
  return -1;
}

Fixed version (ground truth):
public int getDef(int i){
  return -1;
}
Program: 41001
Project: 41001
Buggy source:
public byte get(int i){
  return b[i];
}

Fixed version (ground truth):
public byte get(int i) throws IllegalArgumentException {
  if (i >= b.length) {
    throw new IllegalArgumentException("String_Node_Str" + b.length + "String_Node_Str"+ i);
  }
  return b[i];
}
Program: 41002
Project: 41002
Buggy source:
/** 
 * Remove the next Object from the queue and return it to the caller. Throws <code>IllegalStateException</code> if the queue is empty when this method is called.
 * @return the next Object in the queue.
 */
public T pop(){
  if (isEmpty())   throw new IllegalStateException("String_Node_Str");
  T element=qItems.get(0);
  qItems.remove(0);
  inQueue.remove(element);
  return element;
}

Fixed version (ground truth):
/** 
 * Remove the next Object from the queue and return it to the caller. Throws <code>IllegalStateException</code> if the queue is empty when this method is called.
 * @return the next Object in the queue.
 */
public T pop() throws IllegalStateException {
  if (isEmpty())   throw new IllegalStateException("String_Node_Str");
  T element=qItems.get(0);
  qItems.remove(0);
  inQueue.remove(element);
  return element;
}
Program: 41003
Project: 41003
Buggy source:
/** 
 * Returns the next Object in the queue, but leaves it in the queue. Throws <code>IllegalStateException</code> if the queue is empty when this method is called.
 * @return the next Object in the queue.
 */
public T peek(){
  if (isEmpty())   throw new IllegalStateException("String_Node_Str");
  return qItems.get(0);
}

Fixed version (ground truth):
/** 
 * Returns the next Object in the queue, but leaves it in the queue. Throws <code>IllegalStateException</code> if the queue is empty when this method is called.
 * @return the next Object in the queue.
 */
public T peek() throws IllegalStateException {
  if (isEmpty())   throw new IllegalStateException("String_Node_Str");
  return qItems.get(0);
}
Program: 41004
Project: 41004
Buggy source:
public void remove(){
  Assertions.UNREACHABLE();
}

Fixed version (ground truth):
public void remove() throws UnsupportedOperationException {
  throw new UnsupportedOperationException();
}
Program: 41005
Project: 41005
Buggy source:
/** 
 * Method UNREACHABLE.
 * @param string
 */
public static void UNREACHABLE(String string){
  throw new UnimplementedError(string);
}

Fixed version (ground truth):
/** 
 * Method UNREACHABLE.
 * @param string
 */
@Internal public static void UNREACHABLE(String string){
  throw new UnimplementedError(string);
}
Program: 41006
Project: 41006
Buggy source:
private JarFile getRtJar(){
  for (Iterator MS=getModules(getPrimordialLoader()).iterator(); MS.hasNext(); ) {
    Module M=(Module)MS.next();
    if (M instanceof JarFileModule) {
      JarFile JF=((JarFileModule)M).getJarFile();
      if (JF.getName().endsWith(File.separator + "String_Node_Str"))       return JF;
      if (JF.getName().endsWith(File.separator + "String_Node_Str"))       return JF;
    }
  }
  Assertions.UNREACHABLE();
  return null;
}

Fixed version (ground truth):
/** 
 * @return the rt.jar (1.4) or core.jar (1.5) file, or null if not found.
 */
private JarFile getRtJar(){
  for (Iterator MS=getModules(getPrimordialLoader()).iterator(); MS.hasNext(); ) {
    Module M=(Module)MS.next();
    if (M instanceof JarFileModule) {
      JarFile JF=((JarFileModule)M).getJarFile();
      if (JF.getName().endsWith(File.separator + "String_Node_Str")) {
        return JF;
      }
      if (JF.getName().endsWith(File.separator + "String_Node_Str")) {
        return JF;
      }
    }
  }
  return null;
}
Program: 41007
Project: 41007
Buggy source:
public SSAInstruction copyForSSA(int[] defs,int[] uses){
  return new SSAPhiInstruction(defs == null ? result : defs[0],uses == null ? params : uses);
}

Fixed version (ground truth):
public SSAInstruction copyForSSA(int[] defs,int[] uses) throws IllegalArgumentException {
  if (defs != null && defs.length == 0) {
    throw new IllegalArgumentException();
  }
  return new SSAPhiInstruction(defs == null ? result : defs[0],uses == null ? params : uses);
}
Program: 41008
Project: 41008
Buggy source:
/** 
 * @see com.ibm.wala.ssa.SSAInstruction#getUse(int)
 */
public int getUse(int j){
  return params[j];
}

Fixed version (ground truth):
/** 
 * @see com.ibm.wala.ssa.SSAInstruction#getUse(int)
 */
public int getUse(int j) throws IllegalArgumentException {
  if (j >= params.length) {
    throw new IllegalArgumentException("String_Node_Str" + j);
  }
  return params[j];
}
Program: 41009
Project: 41009
Buggy source:
ArrayTypeSignature(String s){
  super(s);
  assert(s.charAt(0) == '[');
}

Fixed version (ground truth):
ArrayTypeSignature(String s) throws IllegalArgumentException {
  super(s);
  if (s.length() == 0) {
    throw new IllegalArgumentException();
  }
  if (s.charAt(0) != '[') {
    throw new IllegalArgumentException();
  }
}
Program: 41010
Project: 41010
Buggy source:
public static ArrayTypeSignature make(String s){
  return new ArrayTypeSignature(s);
}

Fixed version (ground truth):
public static ArrayTypeSignature make(String s) throws IllegalArgumentException {
  return new ArrayTypeSignature(s);
}
Program: 41011
Project: 41011
Buggy source:
public static ClassTypeSignature makeClassTypeSig(String s){
  return new ClassTypeSignature(s);
}

Fixed version (ground truth):
public static ClassTypeSignature makeClassTypeSig(String s) throws IllegalArgumentException {
  return new ClassTypeSignature(s);
}
Program: 41012
Project: 41012
Buggy source:
ClassTypeSignature(String s){
  super(s);
  assert(s.charAt(0) == 'L');
  assert(s.charAt(s.length() - 1) == ';');
}

Fixed version (ground truth):
ClassTypeSignature(String s) throws IllegalArgumentException {
  super(s);
  if (s.length() == 0) {
    throw new IllegalArgumentException();
  }
  if (s.charAt(0) != 'L') {
    throw new IllegalArgumentException(s);
  }
  if (s.charAt(s.length() - 1) != ';') {
    throw new IllegalArgumentException(s);
  }
}
Program: 41013
Project: 41013
Buggy source:
public FormalTypeParameter(String s){
  super(s);
  id=parseForId(s);
  classBound=parseForClassBound(s);
  interfaceBounds=parseForInterfaceBounds(s);
}

Fixed version (ground truth):
public FormalTypeParameter(String s) throws IllegalArgumentException {
  super(s);
  id=parseForId(s);
  classBound=parseForClassBound(s);
  interfaceBounds=parseForInterfaceBounds(s);
}
Program: 41014
Project: 41014
Buggy source:
private String parseForId(String s){
  return s.substring(0,s.indexOf(':'));
}

Fixed version (ground truth):
private String parseForId(String s) throws IllegalArgumentException {
  if (s.indexOf(':') == -1) {
    throw new IllegalArgumentException(s);
  }
  return s.substring(0,s.indexOf(':'));
}
Program: 41015
Project: 41015
Buggy source:
public static FormalTypeParameter make(String string){
  return new FormalTypeParameter(string);
}

Fixed version (ground truth):
public static FormalTypeParameter make(String string) throws IllegalArgumentException {
  return new FormalTypeParameter(string);
}
Program: 41016
Project: 41016
Buggy source:
public MethodTypeSignature(String s){
  super(s);
}

Fixed version (ground truth):
private MethodTypeSignature(String s){
  super(s);
}
Program: 41017
Project: 41017
Buggy source:
public static MethodTypeSignature make(String genericsSignature){
  return new MethodTypeSignature(genericsSignature);
}

Fixed version (ground truth):
public static MethodTypeSignature make(String genericsSignature) throws IllegalArgumentException {
  if (genericsSignature.length() == 0) {
    throw new IllegalArgumentException();
  }
  return new MethodTypeSignature(genericsSignature);
}
Program: 41018
Project: 41018
Buggy source:
public static TypeArgument[] make(String s){
  assert(s.charAt(0) == '<');
  assert(s.charAt(s.length() - 1) == '>');
  String[] args=parseForTypeArguments(s);
  TypeArgument[] result=new TypeArgument[args.length];
  for (int i=0; i < result.length; i++) {
    result[i]=makeTypeArgument(args[i]);
  }
  return result;
}

Fixed version (ground truth):
public static TypeArgument[] make(String s) throws IllegalArgumentException {
  if (s.length() == 0 || s.charAt(0) != '<') {
    throw new IllegalArgumentException(s);
  }
  if (s.charAt(s.length() - 1) != '>') {
    throw new IllegalArgumentException(s);
  }
  String[] args=parseForTypeArguments(s);
  TypeArgument[] result=new TypeArgument[args.length];
  for (int i=0; i < result.length; i++) {
    result[i]=makeTypeArgument(args[i]);
  }
  return result;
}
Program: 41019
Project: 41019
Buggy source:
private TypeVariableSignature(String s){
  super(s);
  assert(s.charAt(s.length() - 1) == ';');
}

Fixed version (ground truth):
private TypeVariableSignature(String s) throws IllegalArgumentException {
  super(s);
  if (s.length() == 0) {
    throw new IllegalArgumentException();
  }
  if (s.charAt(s.length() - 1) != ';') {
    throw new IllegalArgumentException(s);
  }
}
Program: 41020
Project: 41020
Buggy source:
public static TypeVariableSignature make(String s){
  return new TypeVariableSignature(s);
}

Fixed version (ground truth):
public static TypeVariableSignature make(String s) throws IllegalArgumentException {
  return new TypeVariableSignature(s);
}
Program: 41021
Project: 41021
Buggy source:
/** 
 * Add this edge, unconditionally setting it as the next successor.
 * @see com.ibm.wala.util.graph.EdgeManager#addEdge(java.lang.Object,java.lang.Object)
 */
public void addEdge(T src,T dst){
  delegate.addEdge(src,dst);
  SimpleVector<T> s=successorEdges.get(src);
  if (s == null) {
    s=new SimpleVector<T>();
    successorEdges.put(src,s);
  }
  s.set(s.getMaxIndex() + 1,dst);
}

Fixed version (ground truth):
public void addEdge(int i,T src,T dst){
  delegate.addEdge(src,dst);
  SimpleVector<T> s=successorEdges.get(src);
  if (s == null) {
    s=new SimpleVector<T>();
    successorEdges.put(src,s);
  }
  s.set(i,dst);
}
Program: 41022
Project: 41022
Buggy source:
public void remove(){
  Assertions.UNREACHABLE();
}

Fixed version (ground truth):
public void remove() throws UnsupportedOperationException {
  throw new UnsupportedOperationException();
}
Program: 41023
Project: 41023
Buggy source:
/** 
 * Remove an object from this bit set.
 * @param o the object to remove
 */
public void clear(T o){
  int n=map.getMappedIndex(o);
  vector.clear(n);
}

Fixed version (ground truth):
/** 
 * Remove an object from this bit set.
 * @param o the object to remove
 */
public void clear(T o){
  int n=map.getMappedIndex(o);
  if (n == -1) {
    return;
  }
  vector.clear(n);
}
Program: 41024
Project: 41024
Buggy source:
/** 
 * Does this set contain a certain object?
 */
public boolean contains(T o){
  int n=map.getMappedIndex(o);
  return vector.get(n);
}

Fixed version (ground truth):
/** 
 * Does this set contain a certain object?
 */
public boolean contains(T o){
  int n=map.getMappedIndex(o);
  if (n == -1) {
    return false;
  }
  return vector.get(n);
}
Program: 41025
Project: 41025
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public IStructuredSelection getSelection(){
  GraphViewer viewer=(GraphViewer)getApplicationWindow();
  return (IStructuredSelection)viewer.viewer.getSelection();
}

Fixed version (ground truth):
/** 
 * @return
 * @throws IllegalStateException
 */
public IStructuredSelection getSelection() throws IllegalStateException {
  GraphViewer viewer=(GraphViewer)getApplicationWindow();
  if (viewer == null || viewer.viewer == null) {
    throw new IllegalStateException();
  }
  return (IStructuredSelection)viewer.viewer.getSelection();
}
Program: 41026
Project: 41026
Buggy source:
public Statement[] getExitsForProcedure(PDG procedure){
  if (procedure.equals(getMain())) {
    Statement[] normal=procedure.getReturnStatements();
    Statement[] result=new Statement[normal.length + 1];
    result[0]=getMainExit();
    System.arraycopy(normal,0,result,1,normal.length);
    return result;
  }
 else {
    return procedure.getReturnStatements();
  }
}

Fixed version (ground truth):
public Statement[] getExitsForProcedure(PDG procedure){
  if (procedure.equals(getMain()) && backward) {
    Statement[] normal=procedure.getReturnStatements();
    Statement[] result=new Statement[normal.length + 1];
    result[0]=getMainExit();
    System.arraycopy(normal,0,result,1,normal.length);
    return result;
  }
 else {
    return procedure.getReturnStatements();
  }
}
Program: 41027
Project: 41027
Buggy source:
private final void assertDisjoint(){
  if (DEBUG) {
    if (densePart != null) {
      for (IntIterator sparseBits=sparsePart.intIterator(); sparseBits.hasNext(); ) {
        int bit=sparseBits.next();
        if (densePart.contains(bit)) {
          Assertions._assert(!densePart.contains(bit),this.toString());
        }
        if (inDenseRange(bit)) {
          Assertions._assert(!inDenseRange(bit),this.toString());
        }
      }
    }
  }
}

Fixed version (ground truth):
private final boolean assertDisjoint(){
  if (DEBUG) {
    if (densePart != null) {
      for (IntIterator sparseBits=sparsePart.intIterator(); sparseBits.hasNext(); ) {
        int bit=sparseBits.next();
        if (densePart.contains(bit)) {
          return false;
        }
        if (inDenseRange(bit)) {
          return false;
        }
      }
    }
  }
  return true;
}
Program: 41028
Project: 41028
Buggy source:
/** 
 * Add an integer value to this set.
 * @param i integer to add
 * @return true iff the value of this changes.
 */
public boolean add(int i){
  if (densePart != null && inDenseRange(i)) {
    if (!densePart.get(i)) {
      densePart.set(i);
      assertDisjoint();
      return true;
    }
  }
 else   if (!sparsePart.contains(i)) {
    sparsePart.add(i);
    assertDisjoint();
    fixAfterSparseInsert();
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Add an integer value to this set.
 * @param i integer to add
 * @return true iff the value of this changes.
 */
public boolean add(int i){
}
Program: 41029
Project: 41029
Buggy source:
/** 
 * Add all members of set to this.
 * @param set
 * @return true iff the value of this changes.
 */
public boolean addAll(IntSet set){
  boolean change=false;
  if (set instanceof SemiSparseMutableIntSet) {
    SemiSparseMutableIntSet that=(SemiSparseMutableIntSet)set;
    if (densePart == null) {
      if (that.densePart != null) {
        int oldSize=size();
        densePart=new OffsetBitVector(that.densePart);
        for (IntIterator bits=sparsePart.intIterator(); bits.hasNext(); ) {
          int bit=bits.next();
          if (inDenseRange(bit)) {
            densePart.set(bit);
          }
        }
        sparsePart.removeAll(densePart);
        sparsePart.addAll(that.sparsePart);
        change=size() != oldSize;
      }
 else {
        change=sparsePart.addAll(that.sparsePart);
        fixAfterSparseInsert();
      }
    }
 else {
      if (that.densePart != null) {
        int oldSize=size();
        densePart.or(that.densePart);
        sparsePart.addAll(that.sparsePart);
        for (IntIterator bits=sparsePart.intIterator(); bits.hasNext(); ) {
          int bit=bits.next();
          if (inDenseRange(bit)) {
            densePart.set(bit);
          }
        }
        sparsePart.removeAll(densePart);
        change=size() != oldSize;
      }
 else {
        for (IntIterator bs=that.sparsePart.intIterator(); bs.hasNext(); ) {
          change|=add(bs.next());
        }
      }
    }
  }
 else {
    for (IntIterator bs=set.intIterator(); bs.hasNext(); ) {
      change|=add(bs.next());
    }
  }
  assertDisjoint();
  return change;
}

Fixed version (ground truth):
/** 
 * Add all members of set to this.
 * @param set
 * @return true iff the value of this changes.
 */
public boolean addAll(IntSet set){
}
Program: 41030
Project: 41030
Buggy source:
/** 
 * Sets all bits.
 */
public final void setAll(){
  expand(0,length());
  for (int i=0; i < bits.length; i++) {
    bits[i]=MASK;
  }
}

Fixed version (ground truth):
/** 
 * Sets all bits.
 */
public final void setAll(){
  expand(0,length() - 1);
  for (int i=0; i < bits.length; i++) {
    bits[i]=MASK;
  }
}
Program: 41031
Project: 41031
Buggy source:
/** 
 * Sets a bit.
 * @param bit the bit to be set
 */
public final void set(int bit){
  int shiftBits;
  int subscript;
  if (bit < offset) {
    int newOffset=bit & ~LOW_MASK;
    expand(newOffset,length() - newOffset);
    shiftBits=bit & LOW_MASK;
    subscript=0;
  }
 else {
    bit-=offset;
    shiftBits=bit & LOW_MASK;
    subscript=subscript(bit);
    if (subscript >= bits.length) {
      expand(offset,bit);
    }
  }
  try {
    bits[subscript]|=(1 << shiftBits);
  }
 catch (  RuntimeException e) {
    e.printStackTrace();
    throw e;
  }
}

Fixed version (ground truth):
/** 
 * Sets a bit.
 * @param bit the bit to be set
 */
public final void set(int bit){
  int shiftBits;
  int subscript;
  if (bit < offset) {
    int newOffset=bit & ~LOW_MASK;
    expand(newOffset,length() - 1 - newOffset);
    shiftBits=bit & LOW_MASK;
    subscript=0;
  }
 else {
    bit-=offset;
    shiftBits=bit & LOW_MASK;
    subscript=subscript(bit);
    if (subscript >= bits.length) {
      expand(offset,bit);
    }
  }
  try {
    bits[subscript]|=(1 << shiftBits);
  }
 catch (  RuntimeException e) {
    e.printStackTrace();
    throw e;
  }
}
Program: 41032
Project: 41032
Buggy source:
/** 
 * Compute the asymmetric difference of two sets, a \ b.
 * @param A
 * @param B
 */
public static IntSet diff(IntSet A,IntSet B,MutableIntSetFactory factory){
  if (DEBUG) {
    Trace.println("String_Node_Str" + A + "String_Node_Str"+ B);
  }
  if (A instanceof SparseIntSet && B instanceof SparseIntSet) {
    if (DEBUG) {
      Trace.println("String_Node_Str");
    }
    return SparseIntSet.diff((SparseIntSet)A,(SparseIntSet)B);
  }
 else   if (A instanceof SemiSparseMutableIntSet && B instanceof SemiSparseMutableIntSet) {
    if (DEBUG) {
      Trace.println("String_Node_Str");
    }
    return SemiSparseMutableIntSet.diff((SemiSparseMutableIntSet)A,(SemiSparseMutableIntSet)B);
  }
 else {
    MutableIntSet result=factory.makeCopy(A);
    if (DEBUG) {
      Trace.println("String_Node_Str" + result + "String_Node_Str"+ result.getClass());
    }
    for (IntIterator it=B.intIterator(); it.hasNext(); ) {
      int I=it.next();
      result.remove(I);
      if (DEBUG) {
        Trace.println("String_Node_Str" + I + "String_Node_Str"+ result);
      }
    }
    if (DEBUG) {
      Trace.println("String_Node_Str" + result);
    }
    return result;
  }
}

Fixed version (ground truth):
/** 
 * Compute the asymmetric difference of two sets, a \ b.
 * @param A
 * @param B
 */
public static IntSet diff(IntSet A,IntSet B,MutableIntSetFactory factory){
  if (DEBUG) {
    Trace.println("String_Node_Str" + A + "String_Node_Str"+ B);
  }
  if (A instanceof SparseIntSet && B instanceof SparseIntSet) {
    if (DEBUG) {
      Trace.println("String_Node_Str");
    }
    return SparseIntSet.diff((SparseIntSet)A,(SparseIntSet)B);
  }
 else   if (A instanceof SemiSparseMutableIntSet && B instanceof SemiSparseMutableIntSet) {
    if (DEBUG) {
      Trace.println("String_Node_Str");
    }
    IntSet d=SemiSparseMutableIntSet.diff((SemiSparseMutableIntSet)A,(SemiSparseMutableIntSet)B);
    if (DEBUG) {
      Assertions._assert(d.sameValue(defaultSlowDiff(A,B,factory)));
    }
    return d;
  }
 else {
    return defaultSlowDiff(A,B,factory);
  }
}
Program: 41033
Project: 41033
Buggy source:
/** 
 * @param other
 * @return true iff this is a subset of other
 */
public boolean isSubset(OffsetBitVector other){
  if (this == other) {
    return true;
  }
  int wordDiff=wordDiff(offset,other.offset);
  int i=0;
  for (; i < -wordDiff; i++) {
    if (other.bits[i] != 0) {
      return false;
    }
  }
  int min=Math.min(bits.length,other.bits.length + wordDiff);
  for (; i < min; i++) {
    if ((bits[i] & ~other.bits[i - wordDiff]) != 0) {
      return false;
    }
  }
  for (; i < bits.length; i++) {
    if (bits[i] != 0) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean isSubset(OffsetBitVector other){
  if (this == other) {
    return true;
  }
  int wordDiff=wordDiff(offset,other.offset);
  int maxWord=Math.min(bits.length,other.bits.length - wordDiff);
  int i=0;
  for (; i < -wordDiff; i++) {
    if (bits[i] != 0) {
      return false;
    }
  }
  for (; i < maxWord; i++) {
    if ((bits[i] & ~other.bits[i + wordDiff]) != 0) {
      return false;
    }
  }
  for (; i < bits.length; i++) {
    if (bits[i] != 0) {
      return false;
    }
  }
  return true;
}