Program: 79330
Project: 79330
Buggy source:
public static final Attribute readAttribute(DataInputStream file,ConstantPool constant_pool) throws IOException, ClassFormatException {
  ConstantUtf8 c;
  String name;
  int name_index;
  int length;
  byte tag=Constants.ATTR_UNKNOWN;
  name_index=(int)file.readUnsignedShort();
  c=(ConstantUtf8)constant_pool.getConstant(name_index,Constants.CONSTANT_Utf8);
  name=c.getBytes();
  length=file.readInt();
  for (byte i=0; i < Constants.KNOWN_ATTRIBUTES; i++) {
    if (name.equals(Constants.ATTRIBUTE_NAMES[i])) {
      tag=i;
      break;
    }
  }
switch (tag) {
case Constants.ATTR_UNKNOWN:
    AttributeReader r=(AttributeReader)readers.get(name);
  if (r != null)   return r.createAttribute(name_index,length,file,constant_pool);
 else   return new Unknown(name_index,length,file,constant_pool);
case Constants.ATTR_CONSTANT_VALUE:
return new ConstantValue(name_index,length,file,constant_pool);
case Constants.ATTR_SOURCE_FILE:
return new SourceFile(name_index,length,file,constant_pool);
case Constants.ATTR_CODE:
return new Code(name_index,length,file,constant_pool);
case Constants.ATTR_EXCEPTIONS:
return new ExceptionTable(name_index,length,file,constant_pool);
case Constants.ATTR_LINE_NUMBER_TABLE:
return new LineNumberTable(name_index,length,file,constant_pool);
case Constants.ATTR_LOCAL_VARIABLE_TABLE:
return new LocalVariableTable(name_index,length,file,constant_pool);
case Constants.ATTR_INNER_CLASSES:
return new InnerClasses(name_index,length,file,constant_pool);
case Constants.ATTR_SYNTHETIC:
return new Synthetic(name_index,length,file,constant_pool);
case Constants.ATTR_DEPRECATED:
return new Deprecated(name_index,length,file,constant_pool);
case Constants.ATTR_PMG:
return new PMGClass(name_index,length,file,constant_pool);
case Constants.ATTR_SIGNATURE:
return new Signature(name_index,length,file,constant_pool);
case Constants.ATTR_STACK_MAP:
return new StackMap(name_index,length,file,constant_pool);
default :
throw new IllegalStateException("String_Node_Str");
}
}

Fixed version (ground truth):
public static final Attribute readAttribute(DataInputStream file,ConstantPool constant_pool) throws IOException, ClassFormatException {
  ConstantUtf8 c;
  String name;
  int name_index;
  int length;
  byte tag=Constants.ATTR_UNKNOWN;
  name_index=(int)file.readUnsignedShort();
  c=(ConstantUtf8)constant_pool.getConstant(name_index,Constants.CONSTANT_Utf8);
  name=c.getBytes();
  length=file.readInt();
  for (byte i=0; i < Constants.KNOWN_ATTRIBUTES; i++) {
    if (name.equals(Constants.ATTRIBUTE_NAMES[i])) {
      tag=i;
      break;
    }
  }
switch (tag) {
case Constants.ATTR_UNKNOWN:
    AttributeReader r=(AttributeReader)readers.get(name);
  if (r != null)   return r.createAttribute(name_index,length,file,constant_pool);
 else   return new Unknown(name_index,length,file,constant_pool);
case Constants.ATTR_CONSTANT_VALUE:
return new ConstantValue(name_index,length,file,constant_pool);
case Constants.ATTR_SOURCE_FILE:
return new SourceFile(name_index,length,file,constant_pool);
case Constants.ATTR_CODE:
return new Code(name_index,length,file,constant_pool);
case Constants.ATTR_EXCEPTIONS:
return new ExceptionTable(name_index,length,file,constant_pool);
case Constants.ATTR_LINE_NUMBER_TABLE:
return new LineNumberTable(name_index,length,file,constant_pool);
case Constants.ATTR_LOCAL_VARIABLE_TABLE:
return new LocalVariableTable(name_index,length,file,constant_pool);
case Constants.ATTR_LOCAL_VARIABLE_TYPE_TABLE:
return new LocalVariableTypeTable(name_index,length,file,constant_pool);
case Constants.ATTR_INNER_CLASSES:
return new InnerClasses(name_index,length,file,constant_pool);
case Constants.ATTR_SYNTHETIC:
return new Synthetic(name_index,length,file,constant_pool);
case Constants.ATTR_DEPRECATED:
return new Deprecated(name_index,length,file,constant_pool);
case Constants.ATTR_PMG:
return new PMGClass(name_index,length,file,constant_pool);
case Constants.ATTR_SIGNATURE:
return new Signature(name_index,length,file,constant_pool);
case Constants.ATTR_STACK_MAP:
return new StackMap(name_index,length,file,constant_pool);
default :
throw new IllegalStateException("String_Node_Str");
}
}