Program: 44712
Project: 44712
Buggy source:
static <T>void serialize(ByteArrayOutputStream stream,T object) throws IllegalArgumentException, IllegalAccessException, IOException {
  List<TLV> values=new ArrayList<TLV>();
  for (  java.lang.reflect.Field property : object.getClass().getDeclaredFields()) {
    Field field=property.getAnnotation(Field.class);
    if (field == null) {
      throw new UnsupportedOperationException("String_Node_Str");
    }
    boolean optional=property.getType().equals(Optional.class);
    if (optional) {
      if (property.get(object) == null || !((Optional<?>)property.get(object)).isPresent()) {
        continue;
      }
    }
    final Class<?> type=optional ? (Class<?>)((ParameterizedType)(property.getGenericType())).getActualTypeArguments()[0] : property.getType();
    Object value=(optional ? ((Optional<?>)property.get(object)).get() : property.get(object));
    if (type.equals(String.class)) {
      Preconditions.checkNotNull(value,"String_Node_Str" + property.getName());
      values.add(TLV.of(field.value(),((String)value).getBytes()));
    }
 else     if (type.equals(int.class)) {
      values.add(TLV.of(field.value(),ByteBuffer.allocate(4).putInt((Integer)value).array()));
    }
 else     if (type.equals(long.class)) {
      values.add(TLV.of(field.value(),ByteBuffer.allocate(8).putLong((Long)value).array()));
    }
 else {
      ByteArrayOutputStream nested=new ByteArrayOutputStream();
      serialize(nested,value);
      values.add(TLV.of(field.value(),nested.toByteArray()));
    }
  }
  Marshaller.marshall(stream,values);
}

Fixed version (ground truth):
static <T>void serialize(ByteArrayOutputStream stream,T object) throws IllegalArgumentException, IllegalAccessException, IOException {
  Type annotation=object.getClass().getAnnotation(Type.class);
  Preconditions.checkNotNull(annotation,"String_Node_Str" + object.getClass());
  int container=annotation.value();
  ByteArrayOutputStream content=new ByteArrayOutputStream();
  for (  java.lang.reflect.Field property : object.getClass().getDeclaredFields()) {
    Field field=property.getAnnotation(Field.class);
    boolean optional=property.getType().equals(Optional.class);
    final Class<?> type=optional ? (Class<?>)((ParameterizedType)(property.getGenericType())).getActualTypeArguments()[0] : property.getType();
    if (field == null) {
      if (type.getAnnotation(Type.class) == null) {
        throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str" + property);
      }
    }
 else     if (type.getAnnotation(Type.class) != null) {
      throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str");
    }
    if (optional) {
      if (property.get(object) == null || !((Optional<?>)property.get(object)).isPresent()) {
        continue;
      }
    }
    Object value=(optional ? ((Optional<?>)property.get(object)).get() : property.get(object));
    if (type.equals(String.class)) {
      Preconditions.checkNotNull(value,"String_Node_Str" + property.getName());
      marshall(content,TLV.of(field.value(),((String)value).getBytes()));
    }
 else     if (type.equals(int.class)) {
      marshall(content,TLV.of(field.value(),ByteBuffer.allocate(4).putInt((Integer)value).array()));
    }
 else     if (type.equals(long.class)) {
      marshall(content,TLV.of(field.value(),ByteBuffer.allocate(8).putLong((Long)value).array()));
    }
 else {
      serialize(content,value);
    }
  }
  marshall(stream,TLV.of(container,content.toByteArray()));
}