Program: 176192
Project: 176192
Buggy source:
/** 
 * Builds the type.
 * @param < T > the generic type
 * @param attribType the attrib type
 * @return the type
 */
<T>Type<T> buildType(Class<T> attribType){
  PersistentAttributeType attributeType=attribute != null ? MetaModelBuilder.getPersistentAttributeType(attribute) : persistentAttribType;
switch (attributeType) {
case BASIC:
    return new DefaultBasicType<T>(attribType);
case EMBEDDED:
  return processOnEmbeddables(attribType);
case ELEMENT_COLLECTION:
if (attribute != null && Collection.class.isAssignableFrom(attribType)) {
  java.lang.reflect.Type[] argument=((ParameterizedType)attribute.getGenericType()).getActualTypeArguments();
  return processOnEmbeddables(getTypedClass(argument[0]));
}
 else if (attribute != null && Map.class.isAssignableFrom(attribType)) {
  java.lang.reflect.Type[] argument=((ParameterizedType)attribute.getGenericType()).getActualTypeArguments();
  processOnEmbeddables(getTypedClass(argument[0]));
  return processOnEmbeddables(getTypedClass(argument[1]));
}
 else {
  LOG.warn("String_Node_Str" + attribute + "String_Node_Str");
}
default :
if (!(managedTypes.get(attribType) != null)) {
if (attribute != null && isPluralAttribute(attribute)) {
  java.lang.reflect.Type[] arguments=((ParameterizedType)attribute.getGenericType()).getActualTypeArguments();
  if (arguments != null && arguments.length == 1) {
    attribType=(Class<T>)getTypedClass(arguments[0]);
  }
 else   if (arguments != null && arguments.length > 1) {
    attribType=(Class<T>)getTypedClass(arguments[1]);
  }
}
if (managedTypes.get(attribType) == null) {
  if (attribType.isAnnotationPresent(Entity.class)) {
    EntityType<T> entityType=new DefaultEntityType<T>((Class<T>)attribType,PersistenceType.ENTITY,null);
    managedTypes.put(attribType,entityType);
  }
 else {
    return new DefaultBasicType<T>(attribType);
  }
}
}
return (Type<T>)managedTypes.get(attribType);
}
}

Fixed version (ground truth):
/** 
 * Builds the type.
 * @param < T > the generic type
 * @param attribType the attrib type
 * @return the type
 */
<T>Type<T> buildType(Class<T> attribType){
  PersistentAttributeType attributeType=attribute != null ? MetaModelBuilder.getPersistentAttributeType(attribute) : persistentAttribType;
switch (attributeType) {
case BASIC:
    return new DefaultBasicType<T>(attribType);
case EMBEDDED:
  return processOnEmbeddables(attribType);
case ELEMENT_COLLECTION:
if (attribute != null && Collection.class.isAssignableFrom(attribType)) {
  java.lang.reflect.Type[] argument=((ParameterizedType)attribute.getGenericType()).getActualTypeArguments();
  return processOnEmbeddables(getTypedClass(argument[0]));
}
 else if (attribute != null && Map.class.isAssignableFrom(attribType)) {
  java.lang.reflect.Type[] argument=((ParameterizedType)attribute.getGenericType()).getActualTypeArguments();
  processOnEmbeddables(getTypedClass(argument[0]));
  return processOnEmbeddables(getTypedClass(argument[1]));
}
 else {
  LOG.warn("String_Node_Str" + attribute + "String_Node_Str");
}
default :
if (!(managedTypes.get(attribType) != null)) {
if (attribute != null && isPluralAttribute(attribute)) {
  java.lang.reflect.Type[] arguments=((ParameterizedType)attribute.getGenericType()).getActualTypeArguments();
  if (arguments != null && arguments.length == 1) {
    attribType=(Class<T>)getTypedClass(arguments[0]);
  }
 else   if (arguments != null && arguments.length > 1) {
    attribType=(Class<T>)getTypedClass(arguments[1]);
  }
}
if (managedTypes.get(attribType) == null) {
  if (attribType.isAnnotationPresent(Entity.class)) {
    EntityType<T> entityType=new DefaultEntityType<T>((Class<T>)attribType,PersistenceType.ENTITY,(AbstractIdentifiableType)getType(attribType.getSuperclass(),false));
    managedTypes.put(attribType,entityType);
  }
 else {
    return new DefaultBasicType<T>(attribType);
  }
}
}
return (Type<T>)managedTypes.get(attribType);
}
}