Program: 36496
Project: 36496
Buggy source:
/** 
 * Intended use case: discovering the generic type of a javafx property in the runtime using reflection on parent object's   {@link java.lang.reflect.Field} or {@link java.lang.reflect.Method} return type (javafx property specification).<p/> This works around java's type erasure and makes it possible to determine exact property type even when property value is null or when the value is subtype of the property's generic type. <p/> Returns generic type of a  {@link javafx.beans.property.Property} or formally the 1st genericparameter type of the first generic superclass or interface the provided type inherits from or implements. <p/> The method inspects the class hierarchy and interfaces (if previous yields no result) and looks for generic types. If any class or interface found is generic and its 1st generic parameter type is available it is returned. Otherwise the inspection continues. In case of no success, null is returned
 * @return class of the 1st generic parameter of the specified type of some of its supertype ornull if none.
 */
static Class getGenericPropertyType(Type t){
  String typename=t.getTypeName();
  if (typename.contains("String_Node_Str"))   return Double.class;
  if (typename.contains("String_Node_Str"))   return Integer.class;
  if (typename.contains("String_Node_Str"))   return Float.class;
  if (typename.contains("String_Node_Str"))   return Double.class;
  if (t instanceof ParameterizedType) {
    Type[] generictypes=((ParameterizedType)t).getActualTypeArguments();
    if (generictypes.length > 0 && generictypes[0] instanceof Class)     return (Class)generictypes[0];
 else     return null;
  }
  if (t instanceof Class) {
    Type supertype=((Class)t).getGenericSuperclass();
    Class output=null;
    if (supertype != null && supertype != Object.class)     output=getGenericPropertyType(supertype);
    if (output != null)     return output;
    Type[] superinterfaces=((Class)t).getGenericInterfaces();
    for (    Type superinterface : superinterfaces) {
      if (superinterface instanceof ParameterizedType) {
        output=getGenericPropertyType(superinterface);
        if (output != null)         return output;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Intended use case: discovering the generic type of a javafx property in the runtime using reflection on parent object's   {@link java.lang.reflect.Field} or {@link java.lang.reflect.Method} returntype (javafx property specification). <p/> This works around java's type erasure and makes it possible to determine exact property type even when property value is null or when the value is subtype of the property's generic type. <p/> Returns generic type of a  {@link javafx.beans.property.Property} or formally the 1st genericparameter type of the first generic superclass or interface the provided type inherits from or implements. <p/> The method inspects the class hierarchy and interfaces (if previous yields no result) and looks for generic types. If any class or interface found is generic and its 1st generic parameter type is available it is returned. Otherwise the inspection continues. In case of no success, null is returned
 * @return class of the 1st generic parameter of the specified type or of some of its supertype ornull if none found.
 */
static Class getGenericPropertyType(Type t){
  String typename=t.getTypeName();
  if (typename.contains("String_Node_Str"))   return Double.class;
  if (typename.contains("String_Node_Str"))   return Integer.class;
  if (typename.contains("String_Node_Str"))   return Float.class;
  if (typename.contains("String_Node_Str"))   return Double.class;
  if (t instanceof ParameterizedType) {
    Type[] generictypes=((ParameterizedType)t).getActualTypeArguments();
    if (generictypes.length > 0 && generictypes[0] instanceof Class)     return (Class)generictypes[0];
 else     return null;
  }
  if (t instanceof Class) {
    Type supertype=((Class)t).getGenericSuperclass();
    Class output=null;
    if (supertype != null && supertype != Object.class)     output=getGenericPropertyType(supertype);
    if (output != null)     return output;
    Type[] superinterfaces=((Class)t).getGenericInterfaces();
    for (    Type superinterface : superinterfaces) {
      if (superinterface instanceof ParameterizedType) {
        output=getGenericPropertyType(superinterface);
        if (output != null)         return output;
      }
    }
  }
  return null;
}