nus-yam/ex-repair huggingface dataset:
Program: 100544
Project: 100544
Buggy source:
/** 
 * Add a raw ZipEntry to the output JAR. Call endOutputJarEntry() when you're done.
 * @return the OutputStream to be used to write the entry contents
 */
final public OutputStream addOutputJarEntry(ZipEntry ze) throws IOException {
  putNextEntry(ze);
  return outputJar;
}

Fixed version (ground truth):
/** 
 * Add a raw ZipEntry to the output JAR. Call endOutputJarEntry() when you're done.
 * @return the OutputStream to be used to write the entry contents
 */
final public OutputStream addOutputJarEntry(ZipEntry ze) throws IOException, IllegalStateException {
  if (outputJar == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  putNextEntry(ze);
  return outputJar;
}
Program: 100545
Project: 100545
Buggy source:
/** 
 * Set the JAR Comment for the output JAR.
 */
final public void setJARComment(String comment) throws IOException, IllegalArgumentException {
  makeOutputJar();
  outputJar.setComment(comment);
}

Fixed version (ground truth):
/** 
 * Set the JAR Comment for the output JAR.
 */
final public void setJARComment(String comment) throws IOException, IllegalStateException {
  makeOutputJar();
  outputJar.setComment(comment);
}
Program: 100547
Project: 100547
Buggy source:
/** 
 * Set the bytecodes for this Code attribute.
 */
public void setCode(byte[] code){
  if (code.length > 0xFFFF) {
    throw new IllegalArgumentException("String_Node_Str" + code.length);
  }
  if (code.length == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.code=code;
}

Fixed version (ground truth):
/** 
 * Set the bytecodes for this Code attribute.
 */
public void setCode(byte[] code) throws IllegalArgumentException {
  if (code.length > 0xFFFF) {
    throw new IllegalArgumentException("String_Node_Str" + code.length);
  }
  if (code.length == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.code=code;
}
Program: 100548
Project: 100548
Buggy source:
public int getCodeLength(){
  return code.length;
}

Fixed version (ground truth):
public int getCodeLength() throws IllegalStateException {
  if (code == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  return code.length;
}
Program: 100549
Project: 100549
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: 100550
Project: 100550
Buggy source:
/** 
 * Set the index of the constant pool item holding the source file name.
 */
public void setSourceFileCPIndex(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 source file name.
 */
public void setSourceFileCPIndex(int index) throws IllegalArgumentException {
  if (index < 1 || index > 0xFFFF) {
    throw new IllegalArgumentException("String_Node_Str" + index);
  }
  this.index=index;
}
Program: 100551
Project: 100551
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: 100552
Project: 100552
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: 100553
Project: 100553
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: 100554
Project: 100554
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: 100555
Project: 100555
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;
}
Program: 100556
Project: 100556
Buggy source:
/** 
 * Creates a copy of a Bit String
 * @param s the string to copy
 */
public OffsetBitVector(OffsetBitVector s){
  offset=s.offset;
  bits=new int[s.bits.length];
  copyBits(s);
}

Fixed version (ground truth):
/** 
 * Creates a copy of a Bit String
 * @param s the string to copy
 */
public OffsetBitVector(OffsetBitVector s){
  offset=s.offset;
  bits=new int[s.bits.length];
  System.arraycopy(s.bits,0,bits,0,s.bits.length);
}
Program: 100557
Project: 100557
Buggy source:
/** 
 * Compares this object against the specified object.
 * @param B the object to compare with
 * @return true if the objects are the same; false otherwise.
 */
public final boolean sameBits(OffsetBitVector B){
  if (this == B) {
    return true;
  }
  int n=Math.min(bits.length,B.bits.length);
  if (bits.length > B.bits.length) {
    for (int i=n; i < bits.length; i++) {
      if (bits[i] != 0)       return false;
    }
  }
 else   if (B.bits.length > bits.length) {
    for (int i=n; i < B.bits.length; i++) {
      if (B.bits[i] != 0)       return false;
    }
  }
  for (int i=n - 1; i >= 0; ) {
    if (bits[i] != B.bits[i]) {
      return false;
    }
    i--;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Compares this object against the specified object.
 * @param set the object to compare with
 * @return true if the objects are the same; false otherwise.
 */
public final boolean sameBits(OffsetBitVector set){
  if (this == set) {
    return true;
  }
  int wordDiff=wordDiff(offset,set.offset);
  int maxWord=Math.min(bits.length,set.bits.length - wordDiff);
  int i=0;
  if (wordDiff < 0) {
    for (; i < -wordDiff; i++) {
      if (bits[i] != 0) {
        return false;
      }
    }
  }
 else {
    for (int j=0; j < wordDiff; j++) {
      if (set.bits[j] != 0) {
        return false;
      }
    }
  }
  for (; i < maxWord; i++) {
    if (bits[i] != set.bits[i + wordDiff]) {
      return false;
    }
  }
  for (int j=maxWord + wordDiff; j < set.bits.length; j++) {
    if (set.bits[j] != 0) {
      return false;
    }
  }
  for (; i < bits.length; i++) {
    if (bits[i] != 0) {
      return false;
    }
  }
  return true;
}
Program: 100558
Project: 100558
Buggy source:
public static int[] diffInternal(SparseIntSet A,SparseIntSet B){
  if (Assertions.verifyAssertions) {
    Assertions._assert(A != null);
    Assertions._assert(B != null);
  }
  if (A.isEmpty()) {
    return new int[0];
  }
 else   if (B.isEmpty()) {
    int[] newElts=new int[A.elements.length];
    System.arraycopy(A.elements,0,newElts,0,A.elements.length);
    return newElts;
  }
 else   if (A.equals(B)) {
    return new int[0];
  }
 else   if (A.sameValue(B)) {
    return new int[0];
  }
  int[] ar=A.elements;
  int ai=0;
  int al=A.size;
  int[] br=B.elements;
  int bi=0;
  int bl=B.size;
  int[] cr=new int[al];
  int ci=0;
  while (ai < al && bi < bl) {
    int cmp=(ar[ai] - br[bi]);
    if (cmp > 0) {
      bi++;
    }
 else     if (cmp < 0) {
      cr[ci++]=ar[ai];
      ai++;
    }
 else {
      ai++;
      bi++;
    }
  }
  if (ai < al) {
    int tail=al - ai;
    System.arraycopy(ar,ai,cr,ci,tail);
    ci+=tail;
  }
  ar=new int[ci];
  System.arraycopy(cr,0,ar,0,ci);
  return ar;
}

Fixed version (ground truth):
public static int[] diffInternal(SparseIntSet A,SparseIntSet B){
  if (Assertions.verifyAssertions) {
    Assertions._assert(A != null);
    Assertions._assert(B != null);
  }
  if (A.isEmpty()) {
    return new int[0];
  }
 else   if (B.isEmpty()) {
    int[] newElts=new int[A.size];
    System.arraycopy(A.elements,0,newElts,0,A.size);
    return newElts;
  }
 else   if (A.equals(B)) {
    return new int[0];
  }
 else   if (A.sameValue(B)) {
    return new int[0];
  }
  int[] ar=A.elements;
  int ai=0;
  int al=A.size;
  int[] br=B.elements;
  int bi=0;
  int bl=B.size;
  int[] cr=new int[al];
  int ci=0;
  while (ai < al && bi < bl) {
    int cmp=(ar[ai] - br[bi]);
    if (cmp > 0) {
      bi++;
    }
 else     if (cmp < 0) {
      cr[ci++]=ar[ai];
      ai++;
    }
 else {
      ai++;
      bi++;
    }
  }
  if (ai < al) {
    int tail=al - ai;
    System.arraycopy(ar,ai,cr,ci,tail);
    ci+=tail;
  }
  ar=new int[ci];
  System.arraycopy(cr,0,ar,0,ci);
  return ar;
}
Program: 100559
Project: 100559
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: 100561
Project: 100561
Buggy source:
public int getDef(int i){
  Assertions.UNREACHABLE();
  return -1;
}

Fixed version (ground truth):
public int getDef(int i){
  return -1;
}
Program: 100562
Project: 100562
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: 100563
Project: 100563
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: 100564
Project: 100564
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: 100565
Project: 100565
Buggy source:
public void remove(){
  Assertions.UNREACHABLE();
}

Fixed version (ground truth):
public void remove() throws UnsupportedOperationException {
  throw new UnsupportedOperationException();
}
Program: 100566
Project: 100566
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: 100567
Project: 100567
Buggy source:
/** 
 * @param fileName
 * @return the jar file packaged with this plug-in of the given name, or nullif not found.
 */
private static JarFileModule getFromPlugin(String fileName) throws IOException {
  URL url=FileLocator.find(CorePlugin.getDefault().getBundle(),new Path(fileName),null);
  if (url == null) {
    fileName="String_Node_Str" + fileName;
    url=FileLocator.find(CorePlugin.getDefault().getBundle(),new Path(fileName),null);
    if (url == null) {
      return null;
    }
  }
  url=FileLocator.toFileURL(url);
  return new JarFileModule(new JarFile(filePathFromURL(url)));
}

Fixed version (ground truth):
/** 
 * @param fileName
 * @return the jar file packaged with this plug-in of the given name, or nullif not found.
 */
private static JarFileModule getFromPlugin(String fileName) throws IOException {
  URL url=getFileURLFromPlugin(fileName);
  return (url == null) ? null : new JarFileModule(new JarFile(filePathFromURL(url)));
}
Program: 100568
Project: 100568
Buggy source:
/** 
 * Properly creates the String file name of a   {@link URL}. This works around a bug in the Sun implementation of   {@link URL#getFile()}, which doesn't properly handle file paths with spaces (see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1565842&group_id=176742&atid=878458">bug report</a>).  For now, fails with an assertion if the url is malformed.
 * @param url 
 * @return the path name for the url
 */
public static String filePathFromURL(URL url){
  URI uri=null;
  try {
    uri=new URI(url.toString());
  }
 catch (  URISyntaxException e) {
    Assertions.UNREACHABLE();
  }
  String filePath=uri.getPath();
  return filePath;
}

Fixed version (ground truth):
/** 
 * Properly creates the String file name of a   {@link URL}. This works around a bug in the Sun implementation of   {@link URL#getFile()}, which doesn't properly handle file paths with spaces (see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1565842&group_id=176742&atid=878458">bug report</a>). For now, fails with an assertion if the url is malformed.
 * @param url
 * @return the path name for the url
 */
public static String filePathFromURL(URL url){
  URI uri=null;
  try {
    uri=new URI(url.toString());
  }
 catch (  URISyntaxException e) {
    Assertions.UNREACHABLE();
  }
  String filePath=uri.getPath();
  return filePath;
}
Program: 100569
Project: 100569
Buggy source:
/** 
 * @param fileName
 * @return the jar file packaged with this plug-in of the given name, or nullif not found.
 */
private static File getFileFromPlugin(String fileName) throws IOException {
  URL url=FileLocator.find(CorePlugin.getDefault().getBundle(),new Path(fileName),null);
  if (url == null) {
    fileName="String_Node_Str" + fileName;
    url=FileLocator.find(CorePlugin.getDefault().getBundle(),new Path(fileName),null);
    if (url == null) {
      throw new FileNotFoundException(fileName);
    }
  }
  url=FileLocator.toFileURL(url);
  return new File(filePathFromURL(url));
}

Fixed version (ground truth):
/** 
 * @param fileName
 * @return the jar file packaged with this plug-in of the given name, or nullif not found.
 */
private static File getFileFromPlugin(String fileName) throws IOException {
  URL url=getFileURLFromPlugin(fileName);
  if (url == null) {
    throw new FileNotFoundException(fileName);
  }
  return new File(filePathFromURL(url));
}
Program: 100570
Project: 100570
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: 100571
Project: 100571
Buggy source:
public static void main(String[] args) throws Exception {
  String in=args[0];
  String out=args[1];
  String[] match=new String[args.length - 2];
  System.arraycopy(args,2,match,0,match.length);
  JarFile inJar=new JarFile(in);
  JarOutputStream outJar=new JarOutputStream(new FileOutputStream(out));
  JarFile[] matches=new JarFile[match.length];
  for (int i=0; i < match.length; i++) {
    matches[i]=new JarFile(match[i]);
  }
  for (Enumeration e=inJar.entries(); e.hasMoreElements(); ) {
    JarEntry entry=(JarEntry)e.nextElement();
    if (matchEntry(matches,entry)) {
      outJar.putNextEntry(entry);
      byte[] data=new byte[(int)entry.getSize()];
      InputStream stream=inJar.getInputStream(entry);
      readFully(stream,data);
      outJar.write(data);
      outJar.flush();
    }
  }
  outJar.close();
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception, IllegalArgumentException {
  if (args.length < 2) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String in=args[0];
  String out=args[1];
  String[] match=new String[args.length - 2];
  System.arraycopy(args,2,match,0,match.length);
  JarFile inJar=new JarFile(in);
  JarOutputStream outJar=new JarOutputStream(new FileOutputStream(out));
  JarFile[] matches=new JarFile[match.length];
  for (int i=0; i < match.length; i++) {
    matches[i]=new JarFile(match[i]);
  }
  for (Enumeration e=inJar.entries(); e.hasMoreElements(); ) {
    JarEntry entry=(JarEntry)e.nextElement();
    if (matchEntry(matches,entry)) {
      outJar.putNextEntry(entry);
      byte[] data=new byte[(int)entry.getSize()];
      InputStream stream=inJar.getInputStream(entry);
      readFully(stream,data);
      outJar.write(data);
      outJar.flush();
    }
  }
  outJar.close();
}
Program: 100572
Project: 100572
Buggy source:
public static ArrayStoreInstruction make(String type){
  int i=Util.getTypeIndex(type);
  if (i < 0 || i > TYPE_boolean_index) {
    throw new IllegalArgumentException("String_Node_Str" + type + "String_Node_Str");
  }
  return preallocated[i];
}

Fixed version (ground truth):
public static ArrayStoreInstruction make(String type) throws IllegalArgumentException {
  int i=Util.getTypeIndex(type);
  if (i < 0 || i > TYPE_boolean_index) {
    throw new IllegalArgumentException("String_Node_Str" + type + "String_Node_Str");
  }
  return preallocated[i];
}
Program: 100573
Project: 100573
Buggy source:
public static ConversionInstruction make(String fromType,String toType){
  int from=Util.getTypeIndex(fromType);
  int to=Util.getTypeIndex(toType);
  if (from < 0 || from > TYPE_double_index) {
    throw new IllegalArgumentException("String_Node_Str" + fromType);
  }
  if (from == TYPE_int_index && (to >= TYPE_byte_index && to <= TYPE_short_index)) {
    return preallocated[(OP_i2b - OP_i2l) + (to - TYPE_byte_index)];
  }
 else {
    if (to < 0 || to > TYPE_double_index) {
      throw new IllegalArgumentException("String_Node_Str" + fromType + "String_Node_Str"+ toType);
    }
    if (to == from) {
      throw new IllegalArgumentException("String_Node_Str" + fromType + "String_Node_Str");
    }
    return preallocated[from * 3 + (to > from ? to - 1 : to)];
  }
}

Fixed version (ground truth):
public static ConversionInstruction make(String fromType,String toType) throws IllegalArgumentException {
  int from=Util.getTypeIndex(fromType);
  int to=Util.getTypeIndex(toType);
  if (from < 0 || from > TYPE_double_index) {
    throw new IllegalArgumentException("String_Node_Str" + fromType);
  }
  if (from == TYPE_int_index && (to >= TYPE_byte_index && to <= TYPE_short_index)) {
    return preallocated[(OP_i2b - OP_i2l) + (to - TYPE_byte_index)];
  }
 else {
    if (to < 0 || to > TYPE_double_index) {
      throw new IllegalArgumentException("String_Node_Str" + fromType + "String_Node_Str"+ toType);
    }
    if (to == from) {
      throw new IllegalArgumentException("String_Node_Str" + fromType + "String_Node_Str");
    }
    return preallocated[from * 3 + (to > from ? to - 1 : to)];
  }
}
Program: 100574
Project: 100574
Buggy source:
public static LoadInstruction make(String type,int index){
  int t=Util.getTypeIndex(type);
  if (t < 0 || t > TYPE_Object_index) {
    throw new IllegalArgumentException("String_Node_Str" + type);
  }
  if (index < 16) {
    return preallocated[t * 16 + index];
  }
 else {
    return new LoadInstruction((short)(OP_iload + t),index);
  }
}

Fixed version (ground truth):
public static LoadInstruction make(String type,int index) throws IllegalArgumentException {
  int t=Util.getTypeIndex(type);
  if (t < 0 || t > TYPE_Object_index) {
    throw new IllegalArgumentException("String_Node_Str" + type);
  }
  if (index < 16) {
    return preallocated[t * 16 + index];
  }
 else {
    return new LoadInstruction((short)(OP_iload + t),index);
  }
}
Program: 100575
Project: 100575
Buggy source:
/** 
 * @param type the type of the object that will be returned (in JVM format, e.g., [Ljava/lang/String;)
 * @param arrayBoundsCount the number of array dimensions to preconstruct (equal to the number of integer parameters this instruction expects)
 */
public static NewInstruction make(String type,int arrayBoundsCount){
  if (arrayBoundsCount < 0 || arrayBoundsCount > 255) {
    throw new IllegalArgumentException("String_Node_Str" + arrayBoundsCount);
  }
 else {
    if (type.length() < arrayBoundsCount + 1) {
      throw new IllegalArgumentException("String_Node_Str" + type + "String_Node_Str"+ arrayBoundsCount);
    }
    for (int i=0; i < arrayBoundsCount; i++) {
      if (type.charAt(i) != '[') {
        throw new IllegalArgumentException("String_Node_Str" + type + "String_Node_Str"+ arrayBoundsCount);
      }
    }
    short opcode;
    if (arrayBoundsCount == 0) {
      opcode=OP_new;
    }
 else     if (arrayBoundsCount == 1) {
      char ch=type.charAt(1);
      if (ch != 'L' && ch != '[') {
        opcode=OP_newarray;
      }
 else {
        opcode=OP_anewarray;
      }
    }
 else {
      opcode=OP_multianewarray;
    }
    return new NewInstruction(opcode,type,(short)arrayBoundsCount);
  }
}

Fixed version (ground truth):
/** 
 * @param type the type of the object that will be returned (in JVM format, e.g., [Ljava/lang/String;)
 * @param arrayBoundsCount the number of array dimensions to preconstruct (equal to the number of integer parameters this instruction expects)
 */
public static NewInstruction make(String type,int arrayBoundsCount) throws IllegalArgumentException {
  if (arrayBoundsCount < 0 || arrayBoundsCount > 255) {
    throw new IllegalArgumentException("String_Node_Str" + arrayBoundsCount);
  }
 else {
    if (type.length() < arrayBoundsCount + 1) {
      throw new IllegalArgumentException("String_Node_Str" + type + "String_Node_Str"+ arrayBoundsCount);
    }
    for (int i=0; i < arrayBoundsCount; i++) {
      if (type.charAt(i) != '[') {
        throw new IllegalArgumentException("String_Node_Str" + type + "String_Node_Str"+ arrayBoundsCount);
      }
    }
    short opcode;
    if (arrayBoundsCount == 0) {
      opcode=OP_new;
    }
 else     if (arrayBoundsCount == 1) {
      char ch=type.charAt(1);
      if (ch != 'L' && ch != '[') {
        opcode=OP_newarray;
      }
 else {
        opcode=OP_anewarray;
      }
    }
 else {
      opcode=OP_multianewarray;
    }
    return new NewInstruction(opcode,type,(short)arrayBoundsCount);
  }
}
Program: 100576
Project: 100576
Buggy source:
public static ReturnInstruction make(String type){
  if (type.equals(TYPE_void)) {
    return preallocatedVoid;
  }
 else {
    int t=Util.getTypeIndex(type);
    if (t < 0 || t > TYPE_Object_index) {
      throw new IllegalArgumentException("String_Node_Str" + type);
    }
    return preallocated[t];
  }
}

Fixed version (ground truth):
public static ReturnInstruction make(String type) throws IllegalArgumentException {
  if (type.equals(TYPE_void)) {
    return preallocatedVoid;
  }
 else {
    int t=Util.getTypeIndex(type);
    if (t < 0 || t > TYPE_Object_index) {
      throw new IllegalArgumentException("String_Node_Str" + type);
    }
    return preallocated[t];
  }
}
Program: 100577
Project: 100577
Buggy source:
public static StoreInstruction make(String type,int index){
  int t=Util.getTypeIndex(type);
  if (t < 0 || t > TYPE_Object_index) {
    throw new IllegalArgumentException("String_Node_Str" + type);
  }
  if (index < 16) {
    return preallocated[t * 16 + index];
  }
 else {
    return new StoreInstruction((short)(OP_istore + t),index);
  }
}

Fixed version (ground truth):
public static StoreInstruction make(String type,int index) throws IllegalArgumentException {
  int t=Util.getTypeIndex(type);
  if (t < 0 || t > TYPE_Object_index) {
    throw new IllegalArgumentException("String_Node_Str" + type);
  }
  if (index < 16) {
    return preallocated[t * 16 + index];
  }
 else {
    return new StoreInstruction((short)(OP_istore + t),index);
  }
}
Program: 100578
Project: 100578
Buggy source:
/** 
 * Convert a JVM type name back into a Java class name.
 */
public static String makeClass(String t){
  if (t.startsWith("String_Node_Str")) {
    return t;
  }
 else   if (!t.startsWith("String_Node_Str")) {
    throw new IllegalArgumentException(t + "String_Node_Str");
  }
 else {
    return t.substring(1,t.length() - 1).replace('/','.');
  }
}

Fixed version (ground truth):
/** 
 * Convert a JVM type name back into a Java class name.
 */
public static String makeClass(String t) throws IllegalArgumentException {
  if (t.startsWith("String_Node_Str")) {
    return t;
  }
 else   if (!t.startsWith("String_Node_Str")) {
    throw new IllegalArgumentException(t + "String_Node_Str");
  }
 else {
    return t.substring(1,t.length() - 1).replace('/','.');
  }
}
Program: 100579
Project: 100579
Buggy source:
/** 
 * Append some class information to the store.
 * @param cl the JVM type of the class being added (e.g., Ljava/lang/Object;)
 * @param isInterface true iff it's an interface
 * @param isFinal true iff it's final
 * @param superClass the JVM type of the superclass, or null if this is Object
 * @param superInterfaces the JVM types of its implemented interfaces
 */
public void setClassInfo(String cl,boolean isInterface,boolean isFinal,String superClass,String[] superInterfaces){
  if (superClass != null && superClass.equals(cl)) {
    throw new Error("String_Node_Str" + cl + "String_Node_Str");
  }
  contents.put(cl,new ClassInfo(isInterface,isFinal,superClass,superInterfaces));
}

Fixed version (ground truth):
/** 
 * Append some class information to the store.
 * @param cl the JVM type of the class being added (e.g., Ljava/lang/Object;)
 * @param isInterface true iff it's an interface
 * @param isFinal true iff it's final
 * @param superClass the JVM type of the superclass, or null if this is Object
 * @param superInterfaces the JVM types of its implemented interfaces
 */
public void setClassInfo(String cl,boolean isInterface,boolean isFinal,String superClass,String[] superInterfaces) throws IllegalArgumentException {
  if (superClass != null && superClass.equals(cl)) {
    throw new IllegalArgumentException("String_Node_Str" + cl + "String_Node_Str");
  }
  contents.put(cl,new ClassInfo(isInterface,isFinal,superClass,superInterfaces));
}
Program: 100580
Project: 100580
Buggy source:
/** 
 * Set the JAR Comment for the output JAR.
 */
final public void setJARComment(String comment) throws IOException {
  makeOutputJar();
  outputJar.setComment(comment);
}

Fixed version (ground truth):
/** 
 * Set the JAR Comment for the output JAR.
 */
final public void setJARComment(String comment) throws IOException, IllegalArgumentException {
  makeOutputJar();
  outputJar.setComment(comment);
}
Program: 100581
Project: 100581
Buggy source:
/** 
 * Set the 8 bytes at offset 'offset' in 'buf' to the double value in v.
 */
public static void setDouble(byte[] buf,int offset,double v){
  setLong(buf,offset,Double.doubleToRawLongBits(v));
}

Fixed version (ground truth):
/** 
 * Set the 8 bytes at offset 'offset' in 'buf' to the double value in v.
 */
public static void setDouble(byte[] buf,int offset,double v) throws IllegalArgumentException {
  setLong(buf,offset,Double.doubleToRawLongBits(v));
}
Program: 100582
Project: 100582
Buggy source:
/** 
 * Set the 4 bytes at offset 'offset' in 'buf' to the signed 32-bit value in v.
 */
public static void setInt(byte[] buf,int offset,int v){
  buf[offset]=(byte)(v >> 24);
  buf[offset + 1]=(byte)(v >> 16);
  buf[offset + 2]=(byte)(v >> 8);
  buf[offset + 3]=(byte)v;
}

Fixed version (ground truth):
/** 
 * Set the 4 bytes at offset 'offset' in 'buf' to the signed 32-bit value in v.
 */
public static void setInt(byte[] buf,int offset,int v) throws IllegalArgumentException {
  if (offset >= buf.length) {
    throw new IllegalArgumentException("String_Node_Str" + offset);
  }
  buf[offset]=(byte)(v >> 24);
  buf[offset + 1]=(byte)(v >> 16);
  buf[offset + 2]=(byte)(v >> 8);
  buf[offset + 3]=(byte)v;
}
Program: 100583
Project: 100583
Buggy source:
/** 
 * Set the 8 bytes at offset 'offset' in 'buf' to the signed 64-bit value in v.
 */
public static void setLong(byte[] buf,int offset,long v){
  setInt(buf,offset,(int)(v >> 32));
  setInt(buf,offset + 4,(int)v);
}

Fixed version (ground truth):
/** 
 * Set the 8 bytes at offset 'offset' in 'buf' to the signed 64-bit value in v.
 */
public static void setLong(byte[] buf,int offset,long v) throws IllegalArgumentException {
  setInt(buf,offset,(int)(v >> 32));
  setInt(buf,offset + 4,(int)v);
}
Program: 100584
Project: 100584
Buggy source:
/** 
 * Set the 2 bytes at offset 'offset' in 'buf' to the unsigned 16-bit value in v.
 */
public static void setUShort(byte[] buf,int offset,int v){
  if (offset + 1 >= buf.length) {
    throw new IllegalArgumentException("String_Node_Str" + buf.length + "String_Node_Str"+ offset);
  }
  buf[offset]=(byte)(v >> 8);
  buf[offset + 1]=(byte)v;
}

Fixed version (ground truth):
/** 
 * Set the 2 bytes at offset 'offset' in 'buf' to the unsigned 16-bit value in v.
 */
public static void setUShort(byte[] buf,int offset,int v) throws IllegalArgumentException {
  if (offset + 1 >= buf.length) {
    throw new IllegalArgumentException("String_Node_Str" + buf.length + "String_Node_Str"+ offset);
  }
  buf[offset]=(byte)(v >> 8);
  buf[offset + 1]=(byte)v;
}
Program: 100585
Project: 100585
Buggy source:
/** 
 * Set the constant pool index for the name of the class.
 */
public void setNameIndex(int c){
  if (c < 1 || c > 0xFFFF) {
    throw new IllegalArgumentException("String_Node_Str" + c);
  }
  thisClass=c;
}

Fixed version (ground truth):
/** 
 * Set the constant pool index for the name of the class.
 */
public void setNameIndex(int c) throws IllegalArgumentException {
  if (c < 1 || c > 0xFFFF) {
    throw new IllegalArgumentException("String_Node_Str" + c);
  }
  thisClass=c;
}
Program: 100586
Project: 100586
Buggy source:
/** 
 * Set the 4 bytes at offset 'offset' in 'buf' to the float value in v.
 */
public static void setFloat(byte[] buf,int offset,float v){
  setInt(buf,offset,Float.floatToIntBits(v));
}

Fixed version (ground truth):
/** 
 * Set the 4 bytes at offset 'offset' in 'buf' to the float value in v.
 */
public static void setFloat(byte[] buf,int offset,float v) throws IllegalArgumentException {
  setInt(buf,offset,Float.floatToIntBits(v));
}
Program: 100587
Project: 100587
Buggy source:
/** 
 * Set the byte at offset 'offset' in 'buf' to the unsigned 8-bit value in v.
 */
public static void setUByte(byte[] buf,int offset,int v){
  buf[offset]=(byte)v;
}

Fixed version (ground truth):
/** 
 * Set the byte at offset 'offset' in 'buf' to the unsigned 8-bit value in v.
 */
public static void setUByte(byte[] buf,int offset,int v) throws IllegalArgumentException {
  if (offset >= buf.length) {
    throw new IllegalArgumentException("String_Node_Str" + offset);
  }
  buf[offset]=(byte)v;
}
Program: 100589
Project: 100589
Buggy source:
public int getSize(){
  verify();
  int size=14 + code.length + 2+ (exnHandlers == null ? 0 : exnHandlers.length) * 2 + 2;
  if (attributes != null) {
    for (int i=0; i < attributes.length; i++) {
      size+=attributes[i].getSize();
    }
  }
  return size;
}

Fixed version (ground truth):
public int getSize() throws IllegalArgumentException {
  verify();
  int size=14 + code.length + 2+ (exnHandlers == null ? 0 : exnHandlers.length) * 2 + 2;
  if (attributes != null) {
    for (int i=0; i < attributes.length; i++) {
      size+=attributes[i].getSize();
    }
  }
  return size;
}
Program: 100590
Project: 100590
Buggy source:
public int copyInto(byte[] buf,int offset){
  verify();
  int start=offset;
  ClassWriter.setUShort(buf,offset,attrID);
  ClassWriter.setUShort(buf,offset + 6,maxStack);
  ClassWriter.setUShort(buf,offset + 8,maxLocals);
  ClassWriter.setInt(buf,offset + 10,code.length);
  offset+=14;
  System.arraycopy(code,0,buf,offset,code.length);
  offset+=code.length;
  ClassWriter.setUShort(buf,offset,(exnHandlers == null ? 0 : exnHandlers.length) / 4);
  offset+=2;
  if (exnHandlers != null) {
    for (int i=0; i < exnHandlers.length; i++) {
      ClassWriter.setUShort(buf,offset,exnHandlers[i]);
      offset+=2;
    }
  }
  ClassWriter.setUShort(buf,offset,(attributes == null ? 0 : attributes.length));
  offset+=2;
  if (attributes != null) {
    for (int i=0; i < attributes.length; i++) {
      offset=attributes[i].copyInto(buf,offset);
    }
  }
  ClassWriter.setInt(buf,start + 2,offset - start - 6);
  return offset;
}

Fixed version (ground truth):
public int copyInto(byte[] buf,int offset) throws IllegalArgumentException {
  verify();
  int start=offset;
  ClassWriter.setUShort(buf,offset,attrID);
  ClassWriter.setUShort(buf,offset + 6,maxStack);
  ClassWriter.setUShort(buf,offset + 8,maxLocals);
  ClassWriter.setInt(buf,offset + 10,code.length);
  offset+=14;
  System.arraycopy(code,0,buf,offset,code.length);
  offset+=code.length;
  ClassWriter.setUShort(buf,offset,(exnHandlers == null ? 0 : exnHandlers.length) / 4);
  offset+=2;
  if (exnHandlers != null) {
    for (int i=0; i < exnHandlers.length; i++) {
      ClassWriter.setUShort(buf,offset,exnHandlers[i]);
      offset+=2;
    }
  }
  ClassWriter.setUShort(buf,offset,(attributes == null ? 0 : attributes.length));
  offset+=2;
  if (attributes != null) {
    for (int i=0; i < attributes.length; i++) {
      offset=attributes[i].copyInto(buf,offset);
    }
  }
  ClassWriter.setInt(buf,start + 2,offset - start - 6);
  return offset;
}
Program: 100591
Project: 100591
Buggy source:
public int copyInto(byte[] buf,int offset){
  ClassWriter.setUShort(buf,offset,attrID);
  ClassWriter.setInt(buf,offset + 2,getSize() - 6);
  ClassWriter.setUShort(buf,offset + 6,table == null ? 0 : table.length);
  offset+=8;
  if (table != null) {
    for (int i=0; i < table.length; i++) {
      ClassWriter.setUShort(buf,offset,table[i]);
      offset+=2;
    }
  }
  return offset;
}

Fixed version (ground truth):
public int copyInto(byte[] buf,int offset) throws IllegalArgumentException {
  ClassWriter.setUShort(buf,offset,attrID);
  ClassWriter.setInt(buf,offset + 2,getSize() - 6);
  ClassWriter.setUShort(buf,offset + 6,table == null ? 0 : table.length);
  offset+=8;
  if (table != null) {
    for (int i=0; i < table.length; i++) {
      ClassWriter.setUShort(buf,offset,table[i]);
      offset+=2;
    }
  }
  return offset;
}
Program: 100592
Project: 100592
Buggy source:
public int copyInto(byte[] buf,int offset){
  ClassWriter.setUShort(buf,offset,attrID);
  ClassWriter.setInt(buf,offset + 2,2 + rawTable.length * 2);
  ClassWriter.setUShort(buf,offset + 6,rawTable.length / 2);
  offset+=8;
  for (int i=0; i < rawTable.length; i++) {
    ClassWriter.setUShort(buf,offset,rawTable[i]);
    offset+=2;
  }
  return offset;
}

Fixed version (ground truth):
public int copyInto(byte[] buf,int offset) throws IllegalArgumentException {
  ClassWriter.setUShort(buf,offset,attrID);
  ClassWriter.setInt(buf,offset + 2,2 + rawTable.length * 2);
  ClassWriter.setUShort(buf,offset + 6,rawTable.length / 2);
  offset+=8;
  for (int i=0; i < rawTable.length; i++) {
    ClassWriter.setUShort(buf,offset,rawTable[i]);
    offset+=2;
  }
  return offset;
}
Program: 100593
Project: 100593
Buggy source:
public int copyInto(byte[] buf,int offset){
  ClassWriter.setUShort(buf,offset,attrID);
  ClassWriter.setInt(buf,offset + 2,2 + rawTable.length * 2);
  ClassWriter.setUShort(buf,offset + 6,rawTable.length / 5);
  offset+=8;
  for (int i=0; i < rawTable.length; i++) {
    ClassWriter.setUShort(buf,offset,rawTable[i]);
    offset+=2;
  }
  return offset;
}

Fixed version (ground truth):
public int copyInto(byte[] buf,int offset) throws IllegalArgumentException {
  ClassWriter.setUShort(buf,offset,attrID);
  ClassWriter.setInt(buf,offset + 2,2 + rawTable.length * 2);
  ClassWriter.setUShort(buf,offset + 6,rawTable.length / 5);
  offset+=8;
  for (int i=0; i < rawTable.length; i++) {
    ClassWriter.setUShort(buf,offset,rawTable[i]);
    offset+=2;
  }
  return offset;
}
Program: 100594
Project: 100594
Buggy source:
public int copyInto(byte[] buf,int offset){
  ClassWriter.setUShort(buf,offset,attrID);
  ClassWriter.setInt(buf,offset + 2,getSize() - 6);
  offset+=6;
  if (table != null) {
    for (int i=0; i < table.length; i++) {
      ClassWriter.setUByte(buf,offset,table[i]);
      offset++;
    }
  }
  return offset;
}

Fixed version (ground truth):
public int copyInto(byte[] buf,int offset) throws IllegalArgumentException {
  ClassWriter.setUShort(buf,offset,attrID);
  ClassWriter.setInt(buf,offset + 2,getSize() - 6);
  offset+=6;
  if (table != null) {
    for (int i=0; i < table.length; i++) {
      ClassWriter.setUByte(buf,offset,table[i]);
      offset++;
    }
  }
  return offset;
}
Program: 100595
Project: 100595
Buggy source:
public int getSize(){
  verify();
  return 8;
}

Fixed version (ground truth):
public int getSize() throws IllegalArgumentException {
  verify();
  return 8;
}
Program: 100596
Project: 100596
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: 100597
Project: 100597
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: 100598
Project: 100598
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: 100599
Project: 100599
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: 100600
Project: 100600
Buggy source:
/** 
 * create a Properties object representing the properties set by the command line args. if args[i] is "-foo" and args[i+1] is "bar", then the result will define a property with key "foo" and value "bar"
 * @throws WalaException
 */
public static Properties parse(String[] args) throws WalaException {
  Properties result=new Properties();
  for (int i=0; i < args.length - 1; i++) {
    String key=parseForKey(args[i]);
    if (key != null) {
      if (args[i].contains("String_Node_Str")) {
        result.put(key,args[i].substring(args[i].indexOf('=') + 1));
      }
 else {
        if (args[i + 1].charAt(0) == '-') {
          throw new WalaException("String_Node_Str");
        }
        result.put(key,args[i + 1]);
        i++;
      }
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * create a Properties object representing the properties set by the command line args. if args[i] is "-foo" and args[i+1] is "bar", then the result will define a property with key "foo" and value "bar"
 * @throws WalaException
 */
public static Properties parse(String[] args) throws WalaException {
  Properties result=new Properties();
  for (int i=0; i < args.length; i++) {
    String key=parseForKey(args[i]);
    if (key != null) {
      if (args[i].contains("String_Node_Str")) {
        result.put(key,args[i].substring(args[i].indexOf('=') + 1));
      }
 else {
        if ((i + 1) >= args.length || args[i + 1].charAt(0) == '-') {
          throw new WalaException("String_Node_Str");
        }
        result.put(key,args[i + 1]);
        i++;
      }
    }
  }
  return result;
}
Program: 100601
Project: 100601
Buggy source:
private void runBitsetTest(MutableIntSetFactory p,MutableIntSetFactory s) throws ClassHierarchyException {
  MutableIntSetFactory save=IntSetUtil.getDefaultIntSetFactory();
  IntSetUtil.setDefaultIntSetFactory(new DebuggingMutableIntSetFactory(p,s));
  graphTest.testJLex();
  IntSetUtil.setDefaultIntSetFactory(save);
}

Fixed version (ground truth):
private void runBitsetTest(MutableIntSetFactory p,MutableIntSetFactory s) throws ClassHierarchyException {
  MutableIntSetFactory save=IntSetUtil.getDefaultIntSetFactory();
  try {
    IntSetUtil.setDefaultIntSetFactory(new DebuggingMutableIntSetFactory(p,s));
    graphTest.testJLex();
  }
  finally {
    IntSetUtil.setDefaultIntSetFactory(save);
  }
}