Program: 100503
Project: 100503
Buggy source:
/** 
 * Parse method descriptor to obtain descriptions of method's parameters.
 * @return parameter descriptions, or null if there are no parameters
 */
public static final TypeName[] parseForParameterNames(ImmutableByteArray b){
  if (Assertions.verifyAssertions) {
    if (b.get(0) != '(') {
      Assertions._assert(b.get(0) == '(',"String_Node_Str" + b);
    }
  }
  ArrayList<TypeName> sigs=new ArrayList<TypeName>(10);
  int i=1;
  while (true) {
switch (b.get(i++)) {
case TypeReference.VoidTypeCode:
      sigs.add(TypeReference.VoidName);
    continue;
case TypeReference.BooleanTypeCode:
  sigs.add(TypeReference.BooleanName);
continue;
case TypeReference.ByteTypeCode:
sigs.add(TypeReference.ByteName);
continue;
case TypeReference.ShortTypeCode:
sigs.add(TypeReference.ShortName);
continue;
case TypeReference.IntTypeCode:
sigs.add(TypeReference.IntName);
continue;
case TypeReference.LongTypeCode:
sigs.add(TypeReference.LongName);
continue;
case TypeReference.FloatTypeCode:
sigs.add(TypeReference.FloatName);
continue;
case TypeReference.DoubleTypeCode:
sigs.add(TypeReference.DoubleName);
continue;
case TypeReference.CharTypeCode:
sigs.add(TypeReference.CharName);
continue;
case TypeReference.ClassTypeCode:
{
int off=i - 1;
while (b.get(i++) != ';') ;
sigs.add(TypeName.findOrCreate(b,off,i - off - 1));
continue;
}
case TypeReference.ArrayTypeCode:
{
int off=i - 1;
while (b.get(i) == TypeReference.ArrayTypeCode) {
++i;
}
TypeName T=null;
if (b.get(i++) == TypeReference.ClassTypeCode) {
while (b.get(i++) != ';') ;
T=TypeName.findOrCreate(b,off,i - off - 1);
}
 else {
T=TypeName.findOrCreate(b,off,i - off);
}
sigs.add(T);
continue;
}
case (byte)')':
int size=sigs.size();
if (size == 0) {
return null;
}
Iterator<TypeName> it=sigs.iterator();
TypeName[] result=new TypeName[size];
for (int j=0; j < size; j++) {
result[j]=it.next();
}
return result;
default :
if (Assertions.verifyAssertions) {
Assertions._assert(false,"String_Node_Str" + b);
}
}
}
}

Fixed version (ground truth):
/** 
 * Parse method descriptor to obtain descriptions of method's parameters.
 * @return parameter descriptions, or null if there are no parameters
 */
public static final TypeName[] parseForParameterNames(ImmutableByteArray b) throws IllegalArgumentException {
  if (b.length() <= 2) {
    throw new IllegalArgumentException("String_Node_Str" + b);
  }
  if (b.get(0) != '(') {
    throw new IllegalArgumentException("String_Node_Str" + b);
  }
  ArrayList<TypeName> sigs=new ArrayList<TypeName>(10);
  int i=1;
  while (true) {
switch (b.get(i++)) {
case TypeReference.VoidTypeCode:
      sigs.add(TypeReference.VoidName);
    continue;
case TypeReference.BooleanTypeCode:
  sigs.add(TypeReference.BooleanName);
continue;
case TypeReference.ByteTypeCode:
sigs.add(TypeReference.ByteName);
continue;
case TypeReference.ShortTypeCode:
sigs.add(TypeReference.ShortName);
continue;
case TypeReference.IntTypeCode:
sigs.add(TypeReference.IntName);
continue;
case TypeReference.LongTypeCode:
sigs.add(TypeReference.LongName);
continue;
case TypeReference.FloatTypeCode:
sigs.add(TypeReference.FloatName);
continue;
case TypeReference.DoubleTypeCode:
sigs.add(TypeReference.DoubleName);
continue;
case TypeReference.CharTypeCode:
sigs.add(TypeReference.CharName);
continue;
case TypeReference.ClassTypeCode:
{
int off=i - 1;
while (b.get(i++) != ';') ;
sigs.add(TypeName.findOrCreate(b,off,i - off - 1));
continue;
}
case TypeReference.ArrayTypeCode:
{
int off=i - 1;
while (b.get(i) == TypeReference.ArrayTypeCode) {
++i;
}
TypeName T=null;
if (b.get(i++) == TypeReference.ClassTypeCode) {
while (b.get(i++) != ';') ;
T=TypeName.findOrCreate(b,off,i - off - 1);
}
 else {
T=TypeName.findOrCreate(b,off,i - off);
}
sigs.add(T);
continue;
}
case (byte)')':
int size=sigs.size();
if (size == 0) {
return null;
}
Iterator<TypeName> it=sigs.iterator();
TypeName[] result=new TypeName[size];
for (int j=0; j < size; j++) {
result[j]=it.next();
}
return result;
default :
if (Assertions.verifyAssertions) {
Assertions._assert(false,"String_Node_Str" + b);
}
}
}
}