nus-yam/ex-repair huggingface dataset:
Program: 100421
Project: 100421
Buggy source:
/** 
 * @param o an EClassHierarchy
 * @return a ClassHierarchy populated according to the contents of o
 */
@SuppressWarnings("String_Node_Str") public static EClassHierarchyWrapper load(EObject o){
  EClassHierarchy cha=(EClassHierarchy)o;
  Assertions.productionAssertion(cha != null);
  EClassHierarchyWrapper result=new EClassHierarchyWrapper();
  for (Iterator<EObject> it=cha.getNodes().getContents().iterator(); it.hasNext(); ) {
    result.addNode(it.next());
  }
  for (Iterator it=cha.getEdges().getContents().iterator(); it.hasNext(); ) {
    EPair p=(EPair)it.next();
    result.addEdge(p.getX(),p.getY());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @param o an EClassHierarchy
 * @return a ClassHierarchy populated according to the contents of o
 */
@SuppressWarnings("String_Node_Str") public static EClassHierarchyWrapper load(EClassHierarchy cha){
  Assertions.productionAssertion(cha != null);
  EClassHierarchyWrapper result=new EClassHierarchyWrapper();
  for (Iterator<EObject> it=cha.getNodes().getContents().iterator(); it.hasNext(); ) {
    result.addNode(it.next());
  }
  for (Iterator it=cha.getEdges().getContents().iterator(); it.hasNext(); ) {
    EPair p=(EPair)it.next();
    result.addEdge(p.getX(),p.getY());
  }
  return result;
}
Program: 100422
Project: 100422
Buggy source:
/** 
 * TODO: refactor
 */
@SuppressWarnings("String_Node_Str") public static EInterfaceHierarchyWrapper load(EObject o){
  EInterfaceHierarchy h=(EInterfaceHierarchy)o;
  Assertions.productionAssertion(h != null);
  EInterfaceHierarchyWrapper result=new EInterfaceHierarchyWrapper();
  for (Iterator<EObject> it=h.getNodes().getContents().iterator(); it.hasNext(); ) {
    result.addNode(it.next());
  }
  for (Iterator it=h.getEdges().getContents().iterator(); it.hasNext(); ) {
    EPair p=(EPair)it.next();
    result.addEdge(p.getX(),p.getY());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * TODO: refactor
 */
@SuppressWarnings("String_Node_Str") public static EInterfaceHierarchyWrapper load(EInterfaceHierarchy h){
  Assertions.productionAssertion(h != null);
  EInterfaceHierarchyWrapper result=new EInterfaceHierarchyWrapper();
  for (Iterator<EObject> it=h.getNodes().getContents().iterator(); it.hasNext(); ) {
    result.addNode(it.next());
  }
  for (Iterator it=h.getEdges().getContents().iterator(); it.hasNext(); ) {
    EPair p=(EPair)it.next();
    result.addEdge(p.getX(),p.getY());
  }
  return result;
}
Program: 100423
Project: 100423
Buggy source:
/** 
 * @param xmlFile an xml file
 * @return List<EObject> serialized in said file.
 */
public static List<EObject> readEObjects(String xmlFile,ClassLoader loader){
}

Fixed version (ground truth):
/** 
 * @param xmlFile an xml file
 * @return List<EObject> serialized in said file.
 */
public static List<EObject> readEObjects(String xmlFile,ClassLoader loader) throws WalaException {
  URL url=loader.getResource(xmlFile);
  URI fileURI=null;
  if (url != null) {
    fileURI=URI.createURI(url.toString());
  }
 else {
    fileURI=URI.createFileURI(xmlFile);
  }
  URIConverter converter=getURIConverter();
  ResourceSet resourceSet=new ResourceSetImpl();
  resourceSet.setURIConverter(converter);
  Resource resource=resourceSet.createResource(fileURI);
  try {
    resource.load(null);
  }
 catch (  IOException e) {
    throw new WalaException("String_Node_Str" + xmlFile + "String_Node_Str",e);
  }
  return resource.getContents();
}
Program: 100424
Project: 100424
Buggy source:
public SSAInstruction copyForSSA(int[] defs,int[] uses){
  return new SSAComparisonInstruction(opcode,defs == null || defs.length == 0 ? result : defs[0],uses == null ? val1 : uses[0],uses == null ? val2 : uses[1]);
}

Fixed version (ground truth):
public SSAInstruction copyForSSA(int[] defs,int[] uses){
  return new SSAComparisonInstruction(opcode,defs == null || defs.length == 0 ? result : defs[0],uses == null || uses.length == 0 ? val1 : uses[0],uses == null ? val2 : uses[1]);
}
Program: 100425
Project: 100425
Buggy source:
public SSAInstruction copyForSSA(int[] defs,int[] uses){
  return new SSAGetCaughtExceptionInstruction(bbNumber,defs == null ? exceptionValueNumber : defs[0]);
}

Fixed version (ground truth):
public SSAInstruction copyForSSA(int[] defs,int[] uses){
  return new SSAGetCaughtExceptionInstruction(bbNumber,defs == null || defs.length == 0 ? exceptionValueNumber : defs[0]);
}
Program: 100426
Project: 100426
Buggy source:
/** 
 * Method getUse.
 * @param j
 * @return value number representing the jth use in this instruction. -1 meansTOP (i.e., the value doesn't matter)
 */
public int getUse(int j){
  Assertions.UNREACHABLE();
  return -1;
}

Fixed version (ground truth):
/** 
 * Method getUse.
 * @param j
 * @return value number representing the jth use in this instruction. -1 meansTOP (i.e., the value doesn't matter)
 */
public int getUse(int j) throws UnsupportedOperationException {
  throw new UnsupportedOperationException();
}
Program: 100427
Project: 100427
Buggy source:
public String getJavaLibraryVersion(){
  JarFile rtJar=getRtJar();
  Assertions._assert(rtJar != null,"String_Node_Str");
  try {
    Manifest man=rtJar.getManifest();
    Assertions._assert(man != null,"String_Node_Str");
    String result=man.getMainAttributes().getValue("String_Node_Str");
    if (result == null) {
      Attributes att=man.getMainAttributes();
      System.err.println("String_Node_Str" + att);
      Assertions.UNREACHABLE("String_Node_Str" + rtJar.getName() + "String_Node_Str");
    }
    return result;
  }
 catch (  java.io.IOException e) {
    Assertions.UNREACHABLE("String_Node_Str");
    return null;
  }
}

Fixed version (ground truth):
public String getJavaLibraryVersion() throws IllegalStateException {
  JarFile rtJar=getRtJar();
  if (rtJar == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  try {
    Manifest man=rtJar.getManifest();
    Assertions._assert(man != null,"String_Node_Str");
    String result=man.getMainAttributes().getValue("String_Node_Str");
    if (result == null) {
      Attributes att=man.getMainAttributes();
      System.err.println("String_Node_Str" + att);
      Assertions.UNREACHABLE("String_Node_Str" + rtJar.getName() + "String_Node_Str");
    }
    return result;
  }
 catch (  java.io.IOException e) {
    Assertions.UNREACHABLE("String_Node_Str");
    return null;
  }
}
Program: 100428
Project: 100428
Buggy source:
public boolean isJava15Libraries(){
  return getJavaLibraryVersion().startsWith("String_Node_Str");
}

Fixed version (ground truth):
public boolean isJava15Libraries() throws IllegalStateException {
  return getJavaLibraryVersion().startsWith("String_Node_Str");
}
Program: 100429
Project: 100429
Buggy source:
/** 
 * @return the ClassLoaderReference specified by <code>name</code>.
 */
public ClassLoaderReference getLoader(Atom name){
  if (Assertions.verifyAssertions) {
    if (name.getVal(0) > 'Z') {
      Assertions._assert(name.getVal(0) <= 'Z',"String_Node_Str" + name + "String_Node_Str");
    }
  }
  return loadersByName.get(name);
}

Fixed version (ground truth):
/** 
 * @return the ClassLoaderReference specified by <code>name</code>.
 */
public ClassLoaderReference getLoader(Atom name) throws IllegalArgumentException {
  if (name.length() == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (Assertions.verifyAssertions) {
    if (name.getVal(0) > 'Z') {
      Assertions._assert(name.getVal(0) <= 'Z',"String_Node_Str" + name + "String_Node_Str");
    }
  }
  return loadersByName.get(name);
}
Program: 100430
Project: 100430
Buggy source:
public boolean isJava14Libraries(){
  return getJavaLibraryVersion().startsWith("String_Node_Str");
}

Fixed version (ground truth):
public boolean isJava14Libraries() throws IllegalStateException {
  return getJavaLibraryVersion().startsWith("String_Node_Str");
}
Program: 100431
Project: 100431
Buggy source:
/** 
 * build a constraint saying v \in s
 */
public static IFormula makeSetConstraint(Variable v,IntSet s){
  IntIterator it=s.intIterator();
  int first=it.next();
  IFormula result=RelationFormula.makeEquals(v,first);
  while (it.hasNext()) {
    int i=it.next();
    result=BinaryFormula.or(result,RelationFormula.makeEquals(v,i));
  }
  return result;
}

Fixed version (ground truth):
/** 
 * build a constraint saying v \in s
 */
public static IFormula makeSetConstraint(Variable v,IntSet s){
  if (s.isEmpty()) {
    return RelationFormula.makeEquals(IntConstant.make(0),IntConstant.make(1));
  }
  IntIterator it=s.intIterator();
  int first=it.next();
  IFormula result=RelationFormula.makeEquals(v,first);
  while (it.hasNext()) {
    int i=it.next();
    result=BinaryFormula.or(result,RelationFormula.makeEquals(v,i));
  }
  return result;
}
Program: 100432
Project: 100432
Buggy source:
public SSAInstruction copyForSSA(int[] defs,int[] uses){
  return new SSAComparisonInstruction(opcode,defs == null || defs.length == 0 ? result : defs[0],uses == null || uses.length == 0 ? val1 : uses[0],uses == null ? val2 : uses[1]);
}

Fixed version (ground truth):
public SSAInstruction copyForSSA(int[] defs,int[] uses) throws IllegalArgumentException {
  if (uses != null && uses.length != 2) {
    throw new IllegalArgumentException("String_Node_Str" + uses.length);
  }
  return new SSAComparisonInstruction(opcode,defs == null || defs.length == 0 ? result : defs[0],uses == null ? val1 : uses[0],uses == null ? val2 : uses[1]);
}
Program: 100433
Project: 100433
Buggy source:
public SSAPhiInstruction(int result,int[] params){
  super();
  this.result=result;
  this.params=params;
}

Fixed version (ground truth):
public SSAPhiInstruction(int result,int[] params) throws IllegalArgumentException {
  super();
  this.result=result;
  this.params=params;
  if (params.length == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
}
Program: 100434
Project: 100434
Buggy source:
/** 
 * Note: names for class loader references must be unique.
 * @see java.lang.Object#equals(Object)
 */
public boolean equals(Object obj){
  if (Assertions.verifyAssertions) {
    Assertions._assert(this.getClass().equals(obj.getClass()));
  }
  ClassLoaderReference o=(ClassLoaderReference)obj;
  return name.equals(o.name);
}

Fixed version (ground truth):
/** 
 * Note: names for class loader references must be unique.
 * @see java.lang.Object#equals(Object)
 */
public boolean equals(Object obj){
  if (!getClass().equals(obj.getClass())) {
    return false;
  }
 else {
    ClassLoaderReference o=(ClassLoaderReference)obj;
    return name.equals(o.name);
  }
}
Program: 100435
Project: 100435
Buggy source:
public static TypeSignature make(String s){
  assert(s.length() > 0);
switch (s.charAt(0)) {
case TypeReference.VoidTypeCode:
    Assertions.UNREACHABLE();
  return null;
case TypeReference.BooleanTypeCode:
return BaseType.BOOLEAN;
case TypeReference.ByteTypeCode:
return BaseType.BYTE;
case TypeReference.ShortTypeCode:
return BaseType.SHORT;
case TypeReference.IntTypeCode:
return BaseType.INT;
case TypeReference.LongTypeCode:
return BaseType.LONG;
case TypeReference.FloatTypeCode:
return BaseType.FLOAT;
case TypeReference.DoubleTypeCode:
return BaseType.DOUBLE;
case TypeReference.CharTypeCode:
return BaseType.CHAR;
case 'L':
return ClassTypeSignature.makeClassTypeSig(s);
case 'T':
return TypeVariableSignature.make(s);
case TypeReference.ArrayTypeCode:
return ArrayTypeSignature.make(s);
default :
Assertions.UNREACHABLE(s);
return null;
}
}

Fixed version (ground truth):
public static TypeSignature make(String s) throws IllegalArgumentException {
  assert(s.length() > 0);
switch (s.charAt(0)) {
case TypeReference.VoidTypeCode:
    Assertions.UNREACHABLE();
  return null;
case TypeReference.BooleanTypeCode:
return BaseType.BOOLEAN;
case TypeReference.ByteTypeCode:
return BaseType.BYTE;
case TypeReference.ShortTypeCode:
return BaseType.SHORT;
case TypeReference.IntTypeCode:
return BaseType.INT;
case TypeReference.LongTypeCode:
return BaseType.LONG;
case TypeReference.FloatTypeCode:
return BaseType.FLOAT;
case TypeReference.DoubleTypeCode:
return BaseType.DOUBLE;
case TypeReference.CharTypeCode:
return BaseType.CHAR;
case 'L':
return ClassTypeSignature.makeClassTypeSig(s);
case 'T':
return TypeVariableSignature.make(s);
case TypeReference.ArrayTypeCode:
return ArrayTypeSignature.make(s);
default :
throw new IllegalArgumentException("String_Node_Str" + s);
}
}
Program: 100437
Project: 100437
Buggy source:
/** 
 * Is "this" atom a reserved member name? Note: Sun has reserved all member names starting with '<' for future use. At present, only <init> and <clinit> are used.
 */
public final boolean isReservedMemberName(){
  return val[0] == '<';
}

Fixed version (ground truth):
/** 
 * Is "this" atom a reserved member name? Note: Sun has reserved all member names starting with '<' for future use. At present, only <init> and <clinit> are used.
 */
public final boolean isReservedMemberName(){
  if (length() == 0) {
    return false;
  }
  return val[0] == '<';
}
Program: 100438
Project: 100438
Buggy source:
/** 
 * Parse "this" array descriptor to obtain number of dimensions in corresponding array type. this: descriptor - something like "[Ljava/lang/String;" or "[[I"
 * @return dimensionality - something like "1" or "2"
 */
public final int parseForArrayDimensionality(){
  for (int i=0; ; ++i)   if (val[i] != '[')   return i;
}

Fixed version (ground truth):
/** 
 * Parse "this" array descriptor to obtain number of dimensions in corresponding array type. this: descriptor - something like "[Ljava/lang/String;" or "[[I"
 * @return dimensionality - something like "1" or "2"
 */
public final int parseForArrayDimensionality() throws IllegalArgumentException {
  if (val.length == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (int i=0; ; ++i) {
    if (val[i] != '[') {
      return i;
    }
  }
}
Program: 100439
Project: 100439
Buggy source:
public byte getVal(int i){
  return val[i];
}

Fixed version (ground truth):
/** 
 * @param i
 * @return
 */
public byte getVal(int i) throws IllegalArgumentException {
  try {
    return val[i];
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str"+ val.length);
  }
}
Program: 100440
Project: 100440
Buggy source:
/** 
 * Is "this" atom a class descriptor?
 */
public final boolean isClassDescriptor(){
  return val[0] == 'L';
}

Fixed version (ground truth):
/** 
 * Is "this" atom a class descriptor?
 */
public final boolean isClassDescriptor(){
  if (length() == 0) {
    return false;
  }
  return val[0] == 'L';
}
Program: 100441
Project: 100441
Buggy source:
/** 
 * Parse "this" array descriptor to obtain descriptor for array's element type. this: array descriptor - something like "[I"
 * @return array element descriptor - something like "I"
 */
public final Atom parseForArrayElementDescriptor(){
  return findOrCreate(val,1,val.length - 1);
}

Fixed version (ground truth):
/** 
 * Parse "this" array descriptor to obtain descriptor for array's element type. this: array descriptor - something like "[I"
 * @return array element descriptor - something like "I"
 */
public final Atom parseForArrayElementDescriptor() throws IllegalArgumentException {
  if (val.length == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return findOrCreate(val,1,val.length - 1);
}
Program: 100442
Project: 100442
Buggy source:
/** 
 * Is "this" atom a method descriptor?
 */
public final boolean isMethodDescriptor(){
  return val[0] == '(';
}

Fixed version (ground truth):
/** 
 * Is "this" atom a method descriptor?
 */
public final boolean isMethodDescriptor() throws IllegalArgumentException {
  if (length() == 0) {
    return false;
  }
  return val[0] == '(';
}
Program: 100443
Project: 100443
Buggy source:
/** 
 * Return the innermost element type reference for an array
 */
public final Atom parseForInnermostArrayElementDescriptor(){
  int i=0;
  while (val[i] == '[') {
    i++;
  }
  return findOrCreate(val,i,val.length - i);
}

Fixed version (ground truth):
/** 
 * Return the innermost element type reference for an array
 */
public final Atom parseForInnermostArrayElementDescriptor() throws IllegalArgumentException {
  if (val.length == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int i=0;
  while (val[i] == '[') {
    i++;
  }
  return findOrCreate(val,i,val.length - i);
}
Program: 100444
Project: 100444
Buggy source:
public T next(){
  int i=numbers.next();
  T result=nodeManager.getNode(i);
  if (Assertions.verifyAssertions) {
    if (result == null) {
      Assertions._assert(result != null,"String_Node_Str" + i);
    }
  }
  return result;
}

Fixed version (ground truth):
public T next() throws NoSuchElementException {
  int i=numbers.next();
  T result=nodeManager.getNode(i);
  if (Assertions.verifyAssertions) {
    if (result == null) {
      Assertions._assert(result != null,"String_Node_Str" + i);
    }
  }
  return result;
}
Program: 100445
Project: 100445
Buggy source:
public Instruction redirectTargets(int[] targetMap){
  return make(targetMap[label[0]]);
}

Fixed version (ground truth):
public Instruction redirectTargets(int[] targetMap) throws IllegalArgumentException {
  try {
    return make(targetMap[label[0]]);
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    throw new IllegalArgumentException("String_Node_Str",e);
  }
}
Program: 100446
Project: 100446
Buggy source:
public Instruction redirectTargets(int[] targetMap){
  int[] cs=new int[casesAndLabels.length];
  for (int i=0; i < cs.length; i+=2) {
    cs[i]=casesAndLabels[i];
    cs[i + 1]=targetMap[casesAndLabels[i + 1]];
  }
  return make(cs,targetMap[defaultLabel]);
}

Fixed version (ground truth):
public Instruction redirectTargets(int[] targetMap) throws IllegalArgumentException {
  try {
    int[] cs=new int[casesAndLabels.length];
    for (int i=0; i < cs.length; i+=2) {
      cs[i]=casesAndLabels[i];
      cs[i + 1]=targetMap[casesAndLabels[i + 1]];
    }
    return make(cs,targetMap[defaultLabel]);
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    throw new IllegalArgumentException("String_Node_Str",e);
  }
}
Program: 100447
Project: 100447
Buggy source:
public TypeArgument[] getTypeArguments(){
  if (rawString().indexOf('<') == -1) {
    return null;
  }
 else {
    int start=rawString().indexOf('<');
    int end=endOfTypeArguments();
    return TypeArgument.make(rawString().substring(start,end));
  }
}

Fixed version (ground truth):
public TypeArgument[] getTypeArguments(){
  int lastDot=rawString().lastIndexOf('.');
  if (rawString().indexOf('<',lastDot) == -1) {
    return null;
  }
 else {
    int start=rawString().indexOf('<',lastDot);
    int end=endOfTypeArguments();
    return TypeArgument.make(rawString().substring(start,end));
  }
}
Program: 100448
Project: 100448
Buggy source:
private int endOfTypeArguments(){
  int i=rawString().indexOf('<') + 1;
  assert(i > 0);
  int depth=1;
  while (depth > 0) {
    if (rawString().charAt(i) == '>') {
      depth--;
    }
    if (rawString().charAt(i) == '<') {
      depth++;
    }
    i++;
  }
  return i;
}

Fixed version (ground truth):
private int endOfTypeArguments(){
  int lastDot=rawString().lastIndexOf('.');
  int i=rawString().indexOf('<',lastDot) + 1;
  assert(i > 0);
  int depth=1;
  while (depth > 0) {
    if (rawString().charAt(i) == '>') {
      depth--;
    }
    if (rawString().charAt(i) == '<') {
      depth++;
    }
    i++;
  }
  return i;
}
Program: 100449
Project: 100449
Buggy source:
private static TypeArgument makeTypeArgument(String s){
switch (s.charAt(0)) {
case '*':
    return WILDCARD;
case '+':
case '-':
  Assertions.UNREACHABLE();
return null;
default :
TypeSignature sig=TypeSignature.make(s);
return new TypeArgument(sig);
}
}

Fixed version (ground truth):
private static TypeArgument makeTypeArgument(String s){
switch (s.charAt(0)) {
case '*':
    return WILDCARD;
case '+':
{
    TypeSignature sig=TypeSignature.make(s.substring(1));
    return new TypeArgument(sig,WildcardIndicator.PLUS);
  }
case '-':
{
  TypeSignature sig=TypeSignature.make(s.substring(1));
  return new TypeArgument(sig,WildcardIndicator.MINUS);
}
default :
TypeSignature sig=TypeSignature.make(s);
return new TypeArgument(sig,null);
}
}
Program: 100450
Project: 100450
Buggy source:
/** 
 * @param typeSigs Strin TypeSignature
 * @return tokenize it
 */
static String[] parseForTypeArguments(String typeArgs){
  ArrayList<String> args=new ArrayList<String>(10);
  int i=1;
  while (true) {
switch (typeArgs.charAt(i++)) {
case TypeReference.ClassTypeCode:
{
        int off=i - 1;
        int depth=0;
        while (typeArgs.charAt(i++) != ';' || depth > 0) {
          if (typeArgs.charAt(i - 1) == '<') {
            depth++;
          }
          if (typeArgs.charAt(i - 1) == '>') {
            depth--;
          }
        }
        args.add(typeArgs.substring(off,i));
        continue;
      }
case TypeReference.ArrayTypeCode:
{
      int off=i - 1;
      while (typeArgs.charAt(i) == TypeReference.ArrayTypeCode) {
        ++i;
      }
      if (typeArgs.charAt(i++) == TypeReference.ClassTypeCode) {
        while (typeArgs.charAt(i++) != ';')         ;
        args.add(typeArgs.substring(off,i - off - 1));
      }
 else {
        args.add(typeArgs.substring(off,i - off));
      }
      continue;
    }
case (byte)'T':
{
    int off=i - 1;
    while (typeArgs.charAt(i++) != ';')     ;
    args.add(typeArgs.substring(off,i));
    continue;
  }
case (byte)'>':
int size=args.size();
if (size == 0) {
return null;
}
Iterator<String> it=args.iterator();
String[] result=new String[size];
for (int j=0; j < size; j++) {
result[j]=it.next();
}
return result;
default :
if (Assertions.verifyAssertions) {
Assertions._assert(false,"String_Node_Str" + typeArgs);
}
}
}
}

Fixed version (ground truth):
/** 
 * @param typeSigs TypeSignature
 * @return tokenize it
 */
static String[] parseForTypeArguments(String typeArgs){
  ArrayList<String> args=new ArrayList<String>(10);
  int i=1;
  while (true) {
switch (typeArgs.charAt(i++)) {
case TypeReference.ClassTypeCode:
{
        int off=i - 1;
        int depth=0;
        while (typeArgs.charAt(i++) != ';' || depth > 0) {
          if (typeArgs.charAt(i - 1) == '<') {
            depth++;
          }
          if (typeArgs.charAt(i - 1) == '>') {
            depth--;
          }
        }
        args.add(typeArgs.substring(off,i));
        continue;
      }
case TypeReference.ArrayTypeCode:
{
      int off=i - 1;
      while (typeArgs.charAt(i) == TypeReference.ArrayTypeCode) {
        ++i;
      }
      if (typeArgs.charAt(i++) == TypeReference.ClassTypeCode) {
        while (typeArgs.charAt(i++) != ';')         ;
        args.add(typeArgs.substring(off,i - off - 1));
      }
 else {
        args.add(typeArgs.substring(off,i - off));
      }
      continue;
    }
case (byte)'+':
case (byte)'T':
{
    int off=i - 1;
    while (typeArgs.charAt(i++) != ';')     ;
    args.add(typeArgs.substring(off,i));
    continue;
  }
case (byte)'>':
int size=args.size();
if (size == 0) {
return null;
}
Iterator<String> it=args.iterator();
String[] result=new String[size];
for (int j=0; j < size; j++) {
result[j]=it.next();
}
return result;
default :
if (Assertions.verifyAssertions) {
Assertions._assert(false,"String_Node_Str" + typeArgs);
}
}
}
}
Program: 100451
Project: 100451
Buggy source:
private TypeArgument(TypeSignature sig){
  super(sig.rawString());
  this.sig=sig;
}

Fixed version (ground truth):
private TypeArgument(TypeSignature sig,WildcardIndicator w){
  super(sig.rawString());
  this.sig=sig;
  this.w=w;
}
Program: 100452
Project: 100452
Buggy source:
/** 
 * @param typeSigs TypeSignature
 * @return tokenize it
 */
static String[] parseForTypeArguments(String typeArgs){
  ArrayList<String> args=new ArrayList<String>(10);
  int i=1;
  while (true) {
switch (typeArgs.charAt(i++)) {
case TypeReference.ClassTypeCode:
{
        int off=i - 1;
        int depth=0;
        while (typeArgs.charAt(i++) != ';' || depth > 0) {
          if (typeArgs.charAt(i - 1) == '<') {
            depth++;
          }
          if (typeArgs.charAt(i - 1) == '>') {
            depth--;
          }
        }
        args.add(typeArgs.substring(off,i));
        continue;
      }
case TypeReference.ArrayTypeCode:
{
      int off=i - 1;
      while (typeArgs.charAt(i) == TypeReference.ArrayTypeCode) {
        ++i;
      }
      if (typeArgs.charAt(i++) == TypeReference.ClassTypeCode) {
        while (typeArgs.charAt(i++) != ';')         ;
        args.add(typeArgs.substring(off,i - off - 1));
      }
 else {
        args.add(typeArgs.substring(off,i - off));
      }
      continue;
    }
case (byte)'+':
case (byte)'T':
{
    int off=i - 1;
    while (typeArgs.charAt(i++) != ';')     ;
    args.add(typeArgs.substring(off,i));
    continue;
  }
case (byte)'>':
int size=args.size();
if (size == 0) {
return null;
}
Iterator<String> it=args.iterator();
String[] result=new String[size];
for (int j=0; j < size; j++) {
result[j]=it.next();
}
return result;
default :
if (Assertions.verifyAssertions) {
Assertions._assert(false,"String_Node_Str" + typeArgs);
}
}
}
}

Fixed version (ground truth):
/** 
 * @param typeSigs TypeSignature
 * @return tokenize it
 */
static String[] parseForTypeArguments(String typeArgs){
  ArrayList<String> args=new ArrayList<String>(10);
  int i=1;
  while (true) {
switch (typeArgs.charAt(i++)) {
case TypeReference.ClassTypeCode:
{
        int off=i - 1;
        int depth=0;
        while (typeArgs.charAt(i++) != ';' || depth > 0) {
          if (typeArgs.charAt(i - 1) == '<') {
            depth++;
          }
          if (typeArgs.charAt(i - 1) == '>') {
            depth--;
          }
        }
        args.add(typeArgs.substring(off,i));
        continue;
      }
case TypeReference.ArrayTypeCode:
{
      int off=i - 1;
      while (typeArgs.charAt(i) == TypeReference.ArrayTypeCode) {
        ++i;
      }
      if (typeArgs.charAt(i++) == TypeReference.ClassTypeCode) {
        while (typeArgs.charAt(i++) != ';')         ;
        args.add(typeArgs.substring(off,i - off - 1));
      }
 else {
        args.add(typeArgs.substring(off,i - off));
      }
      continue;
    }
case (byte)'+':
case (byte)'T':
{
    int off=i - 1;
    while (typeArgs.charAt(i++) != ';')     ;
    args.add(typeArgs.substring(off,i));
    continue;
  }
case (byte)'*':
{
  args.add("String_Node_Str");
  continue;
}
case (byte)'>':
int size=args.size();
if (size == 0) {
return null;
}
Iterator<String> it=args.iterator();
String[] result=new String[size];
for (int j=0; j < size; j++) {
result[j]=it.next();
}
return result;
default :
if (Assertions.verifyAssertions) {
Assertions._assert(false,"String_Node_Str" + typeArgs);
}
}
}
}
Program: 100453
Project: 100453
Buggy source:
public boolean isReturn(Statement n){
switch (n.getKind()) {
case EXC_RET_CALLER:
case NORMAL_RET_CALLER:
case HEAP_RET_CALLER:
    return true;
case EXC_RET_CALLEE:
case HEAP_PARAM_CALLEE:
case HEAP_PARAM_CALLER:
case HEAP_RET_CALLEE:
case NORMAL:
case NORMAL_RET_CALLEE:
case PARAM_CALLEE:
case PARAM_CALLER:
case PHI:
case PI:
case METHOD_ENTRY:
  return false;
default :
Assertions.UNREACHABLE(n.getKind().toString());
return false;
}
}

Fixed version (ground truth):
public boolean isReturn(Statement n){
switch (n.getKind()) {
case EXC_RET_CALLER:
case NORMAL_RET_CALLER:
case HEAP_RET_CALLER:
    return true;
case EXC_RET_CALLEE:
case HEAP_PARAM_CALLEE:
case HEAP_PARAM_CALLER:
case HEAP_RET_CALLEE:
case NORMAL:
case NORMAL_RET_CALLEE:
case PARAM_CALLEE:
case PARAM_CALLER:
case PHI:
case PI:
case METHOD_ENTRY:
case CATCH:
  return false;
default :
Assertions.UNREACHABLE(n.getKind().toString());
return false;
}
}
Program: 100454
Project: 100454
Buggy source:
public boolean isEntry(Statement n){
switch (n.getKind()) {
case PARAM_CALLEE:
case HEAP_PARAM_CALLEE:
case METHOD_ENTRY:
    return true;
case PHI:
case PI:
case NORMAL_RET_CALLER:
case PARAM_CALLER:
case HEAP_RET_CALLER:
case NORMAL:
case EXC_RET_CALLEE:
case EXC_RET_CALLER:
case HEAP_PARAM_CALLER:
case HEAP_RET_CALLEE:
case NORMAL_RET_CALLEE:
  return false;
default :
Assertions.UNREACHABLE();
return false;
}
}

Fixed version (ground truth):
public boolean isEntry(Statement n){
switch (n.getKind()) {
case PARAM_CALLEE:
case HEAP_PARAM_CALLEE:
case METHOD_ENTRY:
    return true;
case PHI:
case PI:
case NORMAL_RET_CALLER:
case PARAM_CALLER:
case HEAP_RET_CALLER:
case NORMAL:
case EXC_RET_CALLEE:
case EXC_RET_CALLER:
case HEAP_PARAM_CALLER:
case HEAP_RET_CALLEE:
case NORMAL_RET_CALLEE:
case CATCH:
  return false;
default :
Assertions.UNREACHABLE(n.toString());
return false;
}
}
Program: 100455
Project: 100455
Buggy source:
public boolean isCall(Statement n){
switch (n.getKind()) {
case EXC_RET_CALLEE:
case EXC_RET_CALLER:
case HEAP_PARAM_CALLEE:
case NORMAL_RET_CALLEE:
case NORMAL_RET_CALLER:
case PARAM_CALLEE:
case PHI:
case HEAP_RET_CALLEE:
case HEAP_RET_CALLER:
    return false;
case HEAP_PARAM_CALLER:
case PARAM_CALLER:
  return true;
case NORMAL:
if (sdg.getCOptions().equals(ControlDependenceOptions.NONE)) {
  return false;
}
 else {
  NormalStatement s=(NormalStatement)n;
  return s.getInstruction() instanceof SSAAbstractInvokeInstruction;
}
default :
Assertions.UNREACHABLE();
return false;
}
}

Fixed version (ground truth):
public boolean isCall(Statement n){
switch (n.getKind()) {
case EXC_RET_CALLEE:
case EXC_RET_CALLER:
case HEAP_PARAM_CALLEE:
case NORMAL_RET_CALLEE:
case NORMAL_RET_CALLER:
case PARAM_CALLEE:
case PHI:
case HEAP_RET_CALLEE:
case HEAP_RET_CALLER:
case METHOD_ENTRY:
    return false;
case HEAP_PARAM_CALLER:
case PARAM_CALLER:
  return true;
case NORMAL:
if (sdg.getCOptions().equals(ControlDependenceOptions.NONE)) {
  return false;
}
 else {
  NormalStatement s=(NormalStatement)n;
  return s.getInstruction() instanceof SSAAbstractInvokeInstruction;
}
default :
Assertions.UNREACHABLE(n.toString());
return false;
}
}
Program: 100456
Project: 100456
Buggy source:
public boolean isExit(Statement n){
switch (n.getKind()) {
case PARAM_CALLEE:
case HEAP_PARAM_CALLEE:
case PHI:
case NORMAL_RET_CALLER:
case PARAM_CALLER:
case HEAP_RET_CALLER:
case NORMAL:
case EXC_RET_CALLER:
    return false;
case HEAP_RET_CALLEE:
case EXC_RET_CALLEE:
case NORMAL_RET_CALLEE:
  return true;
default :
Assertions.UNREACHABLE();
return false;
}
}

Fixed version (ground truth):
public boolean isExit(Statement n){
switch (n.getKind()) {
case PARAM_CALLEE:
case HEAP_PARAM_CALLEE:
case PHI:
case NORMAL_RET_CALLER:
case PARAM_CALLER:
case HEAP_RET_CALLER:
case NORMAL:
case EXC_RET_CALLER:
case METHOD_ENTRY:
    return false;
case HEAP_RET_CALLEE:
case EXC_RET_CALLEE:
case NORMAL_RET_CALLEE:
  return true;
default :
Assertions.UNREACHABLE(n.toString());
return false;
}
}
Program: 100457
Project: 100457
Buggy source:
/** 
 * @param s a string that holds a sequence of formal type parameters beginningat index begin
 * @return the index where the next formal type parameter ends (actually, end +1)
 */
static int formalTypeParameterEnds(String s,int begin){
  int result=begin;
  while (s.charAt(result) != ':') {
    result++;
  }
  do {
    assert(s.charAt(result) == ':');
switch (s.charAt(++result)) {
case TypeReference.ClassTypeCode:
{
        while (s.charAt(result++) != ';')         ;
        break;
      }
case ':':
    break;
default :
  if (Assertions.verifyAssertions) {
    Assertions._assert(false,"String_Node_Str" + s + "String_Node_Str"+ (result - 1));
  }
}
}
 while (s.charAt(result) == ':');
return result;
}

Fixed version (ground truth):
/** 
 * @param s a string that holds a sequence of formal type parameters beginningat index begin
 * @return the index where the next formal type parameter ends (actually, end +1)
 */
static int formalTypeParameterEnds(String s,int begin){
  int result=begin;
  while (s.charAt(result) != ':') {
    result++;
  }
  do {
    assert(s.charAt(result) == ':');
switch (s.charAt(++result)) {
case TypeReference.ClassTypeCode:
{
        int depth=0;
        while (s.charAt(result) != ';' || depth > 0) {
          if (s.charAt(result) == '<') {
            depth++;
          }
          if (s.charAt(result) == '>') {
            depth--;
          }
          result++;
        }
        result++;
        break;
      }
case ':':
    break;
default :
  if (Assertions.verifyAssertions) {
    Assertions._assert(false,"String_Node_Str" + s + "String_Node_Str"+ (result - 1));
  }
}
}
 while (s.charAt(result) == ':');
return result;
}
Program: 100459
Project: 100459
Buggy source:
/** 
 * @param v
 * @param klass
 * @return -1 if there is no match
 */
public static int getTypeVariablePosition(TypeVariableSignature v,ShrikeClass klass){
  try {
    ClassSignature sig=klass.getClassSignature();
    if (sig == null) {
      return -1;
    }
    FormalTypeParameter[] fp=sig.getFormalTypeParameters();
    if (fp == null) {
      return -1;
    }
    for (int i=0; i < fp.length; i++) {
      FormalTypeParameter f=fp[i];
      if (f.getIdentifier().equals(v.getIdentifier())) {
        return i;
      }
    }
    Assertions.UNREACHABLE();
    return -1;
  }
 catch (  InvalidClassFileException e) {
    e.printStackTrace();
    Assertions.UNREACHABLE();
    return -1;
  }
}

Fixed version (ground truth):
/** 
 * @param v
 * @param klass
 * @return -1 if there is no match
 */
public static int getTypeVariablePosition(TypeVariableSignature v,ShrikeClass klass){
  try {
    ClassSignature sig=klass.getClassSignature();
    if (sig == null) {
      return -1;
    }
    FormalTypeParameter[] fp=sig.getFormalTypeParameters();
    if (fp == null) {
      return -1;
    }
    for (int i=0; i < fp.length; i++) {
      FormalTypeParameter f=fp[i];
      if (f.getIdentifier().equals(v.getIdentifier())) {
        return i;
      }
    }
    return -1;
  }
 catch (  InvalidClassFileException e) {
    e.printStackTrace();
    Assertions.UNREACHABLE();
    return -1;
  }
}
Program: 100460
Project: 100460
Buggy source:
public int getMappedIndex(T o){
  return offset + delegate.getMappedIndex(o);
}

Fixed version (ground truth):
public int getMappedIndex(T o){
  if (delegate.getMappedIndex(o) == -1) {
    return -1;
  }
  return offset + delegate.getMappedIndex(o);
}
Program: 100461
Project: 100461
Buggy source:
private Set<ModuleEntry> getEntriesRecursive(File dir){
  Set<ModuleEntry> result=new HashSet<ModuleEntry>();
  File[] files=dir.listFiles();
  for (int i=0; i < files.length; i++) {
    if (files[i].isDirectory())     result.addAll(getEntriesRecursive(files[i]));
 else     if (includeFile(files[i]))     result.add(makeFile(files[i]));
  }
  return result;
}

Fixed version (ground truth):
private Set<ModuleEntry> getEntriesRecursive(File dir){
  Set<ModuleEntry> result=HashSetFactory.make();
  File[] files=dir.listFiles();
  if (files != null) {
    for (int i=0; i < files.length; i++) {
      if (files[i].isDirectory()) {
        result.addAll(getEntriesRecursive(files[i]));
      }
 else       if (includeFile(files[i])) {
        result.add(makeFile(files[i]));
      }
    }
  }
 else {
    Trace.println("String_Node_Str" + dir);
  }
  return result;
}
Program: 100462
Project: 100462
Buggy source:
DirectoryTreeModule(File root){
  this.root=root;
}

Fixed version (ground truth):
/** 
 * @param root a directory
 */
DirectoryTreeModule(File root){
}
Program: 100463
Project: 100463
Buggy source:
public void bar() throws BadLanguageExceptionEx1 {
  throw new BadLanguageExceptionEx1();
}

Fixed version (ground truth):
public void bar(){
  throw new NullPointerException();
}
Program: 100464
Project: 100464
Buggy source:
public static void main(String[] args){
  Exception1 e1=new Exception1();
  try {
    FooEx1 f=new FooEx1();
    f.bar();
  }
 catch (  BadLanguageExceptionEx1 e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  Exception1 e1=new Exception1();
  try {
    FooEx1 f=new FooEx1();
    f.bar();
  }
 catch (  BadLanguageExceptionEx1 e) {
    e.printStackTrace();
  }
  try {
    FooEx2 f=new FooEx2();
    f.bar();
  }
 catch (  Throwable e) {
    e.printStackTrace();
  }
}
Program: 100465
Project: 100465
Buggy source:
private void setCatchInstructions(SSACFG ssacfg,AbstractCFG oldcfg){
  for (int i=0; i < oldcfg.getNumberOfNodes(); i++)   if (oldcfg.isCatchBlock(i)) {
    ExceptionHandlerBasicBlock B=(ExceptionHandlerBasicBlock)ssacfg.getNode(i);
    B.setCatchInstruction((SSAGetCaughtExceptionInstruction)getInstructions()[B.getFirstInstructionIndex()]);
  }
}

Fixed version (ground truth):
private void setCatchInstructions(SSACFG ssacfg,AbstractCFG oldcfg){
  for (int i=0; i < oldcfg.getNumberOfNodes(); i++)   if (oldcfg.isCatchBlock(i)) {
    ExceptionHandlerBasicBlock B=(ExceptionHandlerBasicBlock)ssacfg.getNode(i);
    B.setCatchInstruction((SSAGetCaughtExceptionInstruction)getInstructions()[B.getFirstInstructionIndex()]);
    getInstructions()[B.getFirstInstructionIndex()]=null;
  }
}
Program: 100466
Project: 100466
Buggy source:
private AstIR(AstMethod method,SSAInstruction[] instructions,SymbolTable symbolTable,SSACFG cfg,SSAOptions options){
  super(method,instructions,symbolTable,cfg,options);
  setCatchInstructions(getControlFlowGraph(),method.cfg);
  localMap=SSAConversion.convert(method,this,options);
  setupCatchTypes(getControlFlowGraph(),method.catchTypes);
  setupLocationMap();
}

Fixed version (ground truth):
private AstIR(AstMethod method,SSAInstruction[] instructions,SymbolTable symbolTable,SSACFG cfg,SSAOptions options){
  super(method,instructions,symbolTable,cfg,options);
  localMap=SSAConversion.convert(method,this,options);
  setCatchInstructions(getControlFlowGraph(),method.cfg);
  setupCatchTypes(getControlFlowGraph(),method.catchTypes);
  setupLocationMap();
}
Program: 100468
Project: 100468
Buggy source:
private static String[] getJarsInDirectory(String dir){
  File f=new File(dir);
  Assertions.productionAssertion(f.isDirectory(),"String_Node_Str" + dir);
  ArrayList<String> list=new ArrayList<String>();
  addJarFilesFromDirectory(f,list);
  String[] result=new String[list.size()];
  int i=0;
  for (Iterator<String> it=list.iterator(); it.hasNext(); ) {
    result[i++]=it.next();
  }
  return result;
}

Fixed version (ground truth):
private static String[] getJarsInDirectory(String dir){
  File f=new File(dir);
  Assertions.productionAssertion(f.isDirectory(),"String_Node_Str" + dir);
  Collection<File> col=FileUtil.listFiles(dir,"String_Node_Str",true);
  String[] result=new String[col.size()];
  int i=0;
  for (  File jarFile : col) {
    result[i++]=jarFile.getAbsolutePath();
  }
  return result;
}
Program: 100469
Project: 100469
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: 100470
Project: 100470
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: 100471
Project: 100471
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: 100472
Project: 100472
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: 100473
Project: 100473
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: 100474
Project: 100474
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: 100475
Project: 100475
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: 100476
Project: 100476
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: 100477
Project: 100477
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: 100478
Project: 100478
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: 100479
Project: 100479
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: 100480
Project: 100480
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: 100481
Project: 100481
Buggy source:
public MethodTypeSignature(String s){
  super(s);
}

Fixed version (ground truth):
private MethodTypeSignature(String s){
  super(s);
}
Program: 100482
Project: 100482
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: 100483
Project: 100483
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: 100484
Project: 100484
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: 100485
Project: 100485
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: 100486
Project: 100486
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: 100487
Project: 100487
Buggy source:
public void remove(){
  Assertions.UNREACHABLE();
}

Fixed version (ground truth):
public void remove() throws UnsupportedOperationException {
  throw new UnsupportedOperationException();
}
Program: 100488
Project: 100488
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: 100489
Project: 100489
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);
}