Program: 175923
Project: 175923
Buggy source:
/** 
 * Generic method which returns an instance of the given class filled with values dictated by the strategy
 * @param < T > The type for which a filled instance is required
 * @param pojoClass The name of the class for which an instance filled with values is required
 * @param pojoMetadata attribute metadata for POJOs produced recursively
 * @param manufacturingCtx the manufacturing context
 * @param genericTypeArgs The generic type arguments for the current generic class instance
 * @return An instance of &lt;T&gt; filled with dummy values
 * @throws InstantiationException If an exception occurred during instantiation
 * @throws IllegalAccessException If security was violated while creating the object
 * @throws InvocationTargetException If an exception occurred while invoking the constructor or factory method
 * @throws ClassNotFoundException If manufactured class cannot be loaded
 * @throws PodamMockeryException if a problem occurred while creating a POJO instance or while setting its state
 */
private <T>T manufacturePojoInternal(Class<T> pojoClass,AttributeMetadata pojoMetadata,ManufacturingContext manufacturingCtx,Type... genericTypeArgs) throws InstantiationException, IllegalAccessException, InvocationTargetException, ClassNotFoundException {
  @SuppressWarnings("String_Node_Str") T objectToReuse=(T)strategy.getMemoizedObject(pojoMetadata);
  if (objectToReuse != null) {
    LOG.debug("String_Node_Str",pojoClass,Arrays.toString(genericTypeArgs));
    return objectToReuse;
  }
 else {
    LOG.debug("String_Node_Str",pojoClass,Arrays.toString(genericTypeArgs));
  }
  final Map<String,Type> typeArgsMap=new HashMap<String,Type>();
  if (pojoClass.isEnum()) {
    @SuppressWarnings("String_Node_Str") T tmp=(T)typeMultiplexer.getTypeValue(strategy,pojoMetadata,typeArgsMap,PodamConstants.ENUMERATION_QUALIFIER);
    return tmp;
  }
  if (pojoClass.isPrimitive()) {
    @SuppressWarnings("String_Node_Str") T tmp=(T)typeMultiplexer.getTypeValue(strategy,pojoMetadata,typeArgsMap,pojoClass.getName());
    return tmp;
  }
  Type[] genericTypeArgsExtra=TypeManufacturerUtil.fillTypeArgMap(typeArgsMap,pojoClass,genericTypeArgs);
  if (pojoClass.isInterface()) {
    return getValueForAbstractType(pojoClass,pojoMetadata,manufacturingCtx,typeArgsMap,genericTypeArgs);
  }
  T retValue=null;
  try {
    retValue=instantiatePojo(pojoClass,manufacturingCtx,typeArgsMap,genericTypeArgsExtra);
  }
 catch (  SecurityException e) {
    throw new PodamMockeryException("String_Node_Str",e);
  }
  if (retValue == null) {
    return getValueForAbstractType(pojoClass,pojoMetadata,manufacturingCtx,typeArgsMap,genericTypeArgs);
  }
 else {
    strategy.cacheMemoizedObject(pojoMetadata,retValue);
    populatePojoInternal(retValue,manufacturingCtx,typeArgsMap,genericTypeArgsExtra);
  }
  return retValue;
}

Fixed version (ground truth):
/** 
 * Generic method which returns an instance of the given class filled with values dictated by the strategy
 * @param < T > The type for which a filled instance is required
 * @param pojoClass The name of the class for which an instance filled with values is required
 * @param pojoMetadata attribute metadata for POJOs produced recursively
 * @param manufacturingCtx the manufacturing context
 * @param genericTypeArgs The generic type arguments for the current generic class instance
 * @return An instance of &lt;T&gt; filled with dummy values
 * @throws InstantiationException If an exception occurred during instantiation
 * @throws IllegalAccessException If security was violated while creating the object
 * @throws InvocationTargetException If an exception occurred while invoking the constructor or factory method
 * @throws ClassNotFoundException If manufactured class cannot be loaded
 * @throws PodamMockeryException if a problem occurred while creating a POJO instance or while setting its state
 */
private <T>T manufacturePojoInternal(Class<T> pojoClass,AttributeMetadata pojoMetadata,ManufacturingContext manufacturingCtx,Type... genericTypeArgs) throws InstantiationException, IllegalAccessException, InvocationTargetException, ClassNotFoundException {
  @SuppressWarnings("String_Node_Str") T objectToReuse=(T)strategy.getMemoizedObject(pojoMetadata);
  if (objectToReuse != null) {
    LOG.debug("String_Node_Str",pojoClass,Arrays.toString(genericTypeArgs));
    return objectToReuse;
  }
 else {
    LOG.debug("String_Node_Str",pojoClass,Arrays.toString(genericTypeArgs));
  }
  final Map<String,Type> typeArgsMap=new HashMap<String,Type>();
  if (pojoClass.isEnum()) {
    @SuppressWarnings("String_Node_Str") T tmp=(T)typeMultiplexer.getTypeValue(strategy,pojoMetadata,typeArgsMap,PodamConstants.ENUMERATION_QUALIFIER);
    return tmp;
  }
  if (pojoClass.isPrimitive() || pojoClass.equals(String.class) || TypeManufacturerUtil.isWrapper(pojoClass)) {
    @SuppressWarnings("String_Node_Str") T tmp=(T)typeMultiplexer.getTypeValue(strategy,pojoMetadata,typeArgsMap,pojoClass.getName());
    return tmp;
  }
  Type[] genericTypeArgsExtra=TypeManufacturerUtil.fillTypeArgMap(typeArgsMap,pojoClass,genericTypeArgs);
  if (pojoClass.isInterface()) {
    return getValueForAbstractType(pojoClass,pojoMetadata,manufacturingCtx,typeArgsMap,genericTypeArgs);
  }
  T retValue=null;
  try {
    retValue=instantiatePojo(pojoClass,manufacturingCtx,typeArgsMap,genericTypeArgsExtra);
  }
 catch (  SecurityException e) {
    throw new PodamMockeryException("String_Node_Str",e);
  }
  if (retValue == null) {
    return getValueForAbstractType(pojoClass,pojoMetadata,manufacturingCtx,typeArgsMap,genericTypeArgs);
  }
 else {
    strategy.cacheMemoizedObject(pojoMetadata,retValue);
    populatePojoInternal(retValue,manufacturingCtx,typeArgsMap,genericTypeArgsExtra);
  }
  return retValue;
}