Program: 55047
Project: 55047
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private static <IN1,IN2,OUT>TypeInformation<OUT> createTypeInfoWithTypeHierarchy(ArrayList<Type> typeHierarchy,Type t,TypeInformation<IN1> in1Type,TypeInformation<IN2> in2Type){
  if ((t instanceof Class<?> && Tuple.class.isAssignableFrom((Class<?>)t)) || (t instanceof ParameterizedType && Tuple.class.isAssignableFrom((Class<?>)((ParameterizedType)t).getRawType()))) {
    Type curT=t;
    if (curT instanceof Class<?> && ((Class<?>)curT).equals(Tuple.class)) {
      throw new InvalidTypesException("String_Node_Str");
    }
    while (!(curT instanceof ParameterizedType && ((Class<?>)((ParameterizedType)curT).getRawType()).getSuperclass().equals(Tuple.class)) && !(curT instanceof Class<?> && ((Class<?>)curT).getSuperclass().equals(Tuple.class))) {
      typeHierarchy.add(curT);
      if (curT instanceof ParameterizedType) {
        curT=((Class<?>)((ParameterizedType)curT).getRawType()).getGenericSuperclass();
      }
 else {
        curT=((Class<?>)curT).getGenericSuperclass();
      }
    }
    if (curT instanceof Class<?>) {
      throw new InvalidTypesException("String_Node_Str");
    }
    ParameterizedType tupleChild=(ParameterizedType)curT;
    Type[] subtypes=new Type[tupleChild.getActualTypeArguments().length];
    for (int i=0; i < subtypes.length; i++) {
      if (tupleChild.getActualTypeArguments()[i] instanceof TypeVariable<?>) {
        Type varContent=materializeTypeVariable(typeHierarchy,(TypeVariable<?>)tupleChild.getActualTypeArguments()[i]);
        if (varContent == null) {
          subtypes[i]=tupleChild.getActualTypeArguments()[i];
        }
 else {
          subtypes[i]=varContent;
        }
      }
 else {
        subtypes[i]=tupleChild.getActualTypeArguments()[i];
      }
    }
    TypeInformation<?>[] tupleSubTypes=new TypeInformation<?>[subtypes.length];
    for (int i=0; i < subtypes.length; i++) {
      if (subtypes[i] instanceof TypeVariable<?>) {
        ParameterizedType immediateBaseChild=(ParameterizedType)typeHierarchy.get(typeHierarchy.size() - 1);
        tupleSubTypes[i]=createTypeInfoWithImmediateBaseChildInput(immediateBaseChild,(TypeVariable<?>)subtypes[i],in1Type,in2Type);
        if (tupleSubTypes[i] == null) {
          throw new InvalidTypesException("String_Node_Str" + ((TypeVariable<?>)t).getName() + "String_Node_Str"+ ((TypeVariable<?>)t).getGenericDeclaration()+ "String_Node_Str");
        }
      }
 else {
        tupleSubTypes[i]=createTypeInfoWithTypeHierarchy(new ArrayList<Type>(typeHierarchy),subtypes[i],in1Type,in2Type);
      }
    }
    if (t instanceof Class<?>) {
      return new TupleTypeInfo(((Class<? extends Tuple>)t),tupleSubTypes);
    }
 else     if (t instanceof ParameterizedType) {
      return new TupleTypeInfo(((Class<? extends Tuple>)((ParameterizedType)t).getRawType()),tupleSubTypes);
    }
  }
 else   if (t instanceof TypeVariable) {
    Type typeVar=materializeTypeVariable(typeHierarchy,(TypeVariable<?>)t);
    if (typeVar != null) {
      return createTypeInfoWithTypeHierarchy(typeHierarchy,typeVar,in1Type,in2Type);
    }
 else {
      ParameterizedType immediateBaseChild=(ParameterizedType)typeHierarchy.get(typeHierarchy.size() - 1);
      TypeInformation<OUT> typeInfo=(TypeInformation<OUT>)createTypeInfoWithImmediateBaseChildInput(immediateBaseChild,(TypeVariable<?>)t,in1Type,in2Type);
      if (typeInfo != null) {
        return typeInfo;
      }
 else {
        throw new InvalidTypesException("String_Node_Str" + ((TypeVariable<?>)t).getName() + "String_Node_Str"+ ((TypeVariable<?>)t).getGenericDeclaration()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      }
    }
  }
 else   if (t instanceof GenericArrayType) {
    GenericArrayType genericArray=(GenericArrayType)t;
    TypeInformation<?> componentInfo=createTypeInfoWithTypeHierarchy(typeHierarchy,genericArray.getGenericComponentType(),in1Type,in2Type);
    return ObjectArrayTypeInfo.getInfoFor(t,componentInfo);
  }
 else   if (t instanceof ParameterizedType) {
    return getForClass((Class<OUT>)((ParameterizedType)t).getRawType());
  }
 else   if (t instanceof Class) {
    return getForClass((Class<OUT>)t);
  }
  throw new InvalidTypesException("String_Node_Str");
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private static <IN1,IN2,OUT>TypeInformation<OUT> createTypeInfoWithTypeHierarchy(ArrayList<Type> typeHierarchy,Type t,TypeInformation<IN1> in1Type,TypeInformation<IN2> in2Type){
  if ((t instanceof Class<?> && Tuple.class.isAssignableFrom((Class<?>)t)) || (t instanceof ParameterizedType && Tuple.class.isAssignableFrom((Class<?>)((ParameterizedType)t).getRawType()))) {
    Type curT=t;
    if (curT instanceof Class<?> && ((Class<?>)curT).equals(Tuple.class)) {
      throw new InvalidTypesException("String_Node_Str");
    }
    while (!(curT instanceof ParameterizedType && ((Class<?>)((ParameterizedType)curT).getRawType()).getSuperclass().equals(Tuple.class)) && !(curT instanceof Class<?> && ((Class<?>)curT).getSuperclass().equals(Tuple.class))) {
      typeHierarchy.add(curT);
      if (curT instanceof ParameterizedType) {
        curT=((Class<?>)((ParameterizedType)curT).getRawType()).getGenericSuperclass();
      }
 else {
        curT=((Class<?>)curT).getGenericSuperclass();
      }
    }
    if (curT instanceof Class<?>) {
      throw new InvalidTypesException("String_Node_Str");
    }
    ParameterizedType tupleChild=(ParameterizedType)curT;
    Type[] subtypes=new Type[tupleChild.getActualTypeArguments().length];
    for (int i=0; i < subtypes.length; i++) {
      if (tupleChild.getActualTypeArguments()[i] instanceof TypeVariable<?>) {
        Type varContent=materializeTypeVariable(typeHierarchy,(TypeVariable<?>)tupleChild.getActualTypeArguments()[i]);
        if (varContent == null) {
          subtypes[i]=tupleChild.getActualTypeArguments()[i];
        }
 else {
          subtypes[i]=varContent;
        }
      }
 else {
        subtypes[i]=tupleChild.getActualTypeArguments()[i];
      }
    }
    TypeInformation<?>[] tupleSubTypes=new TypeInformation<?>[subtypes.length];
    for (int i=0; i < subtypes.length; i++) {
      if (subtypes[i] instanceof TypeVariable<?>) {
        ParameterizedType immediateBaseChild=(ParameterizedType)typeHierarchy.get(typeHierarchy.size() - 1);
        tupleSubTypes[i]=createTypeInfoWithImmediateBaseChildInput(immediateBaseChild,(TypeVariable<?>)subtypes[i],in1Type,in2Type);
        if (tupleSubTypes[i] == null) {
          throw new InvalidTypesException("String_Node_Str" + ((TypeVariable<?>)subtypes[i]).getName() + "String_Node_Str"+ ((TypeVariable<?>)subtypes[i]).getGenericDeclaration()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
        }
      }
 else {
        tupleSubTypes[i]=createTypeInfoWithTypeHierarchy(new ArrayList<Type>(typeHierarchy),subtypes[i],in1Type,in2Type);
      }
    }
    if (t instanceof Class<?>) {
      return new TupleTypeInfo(((Class<? extends Tuple>)t),tupleSubTypes);
    }
 else     if (t instanceof ParameterizedType) {
      return new TupleTypeInfo(((Class<? extends Tuple>)((ParameterizedType)t).getRawType()),tupleSubTypes);
    }
  }
 else   if (t instanceof TypeVariable) {
    Type typeVar=materializeTypeVariable(typeHierarchy,(TypeVariable<?>)t);
    if (typeVar != null) {
      return createTypeInfoWithTypeHierarchy(typeHierarchy,typeVar,in1Type,in2Type);
    }
 else {
      ParameterizedType immediateBaseChild=(ParameterizedType)typeHierarchy.get(typeHierarchy.size() - 1);
      TypeInformation<OUT> typeInfo=(TypeInformation<OUT>)createTypeInfoWithImmediateBaseChildInput(immediateBaseChild,(TypeVariable<?>)t,in1Type,in2Type);
      if (typeInfo != null) {
        return typeInfo;
      }
 else {
        throw new InvalidTypesException("String_Node_Str" + ((TypeVariable<?>)t).getName() + "String_Node_Str"+ ((TypeVariable<?>)t).getGenericDeclaration()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      }
    }
  }
 else   if (t instanceof GenericArrayType) {
    GenericArrayType genericArray=(GenericArrayType)t;
    TypeInformation<?> componentInfo=createTypeInfoWithTypeHierarchy(typeHierarchy,genericArray.getGenericComponentType(),in1Type,in2Type);
    return ObjectArrayTypeInfo.getInfoFor(t,componentInfo);
  }
 else   if (t instanceof ParameterizedType) {
    return getForClass((Class<OUT>)((ParameterizedType)t).getRawType());
  }
 else   if (t instanceof Class) {
    return getForClass((Class<OUT>)t);
  }
  throw new InvalidTypesException("String_Node_Str");
}