Program: 62617
Project: 62617
Buggy source:
/** 
 * Execution the creation of a bean.
 * @param resolutionContext The {@link BeanResolutionContext}
 * @param beanDefinition    The {@link BeanDefinition}
 * @param qualifier         The {@link Qualifier}
 * @param isSingleton       Whether the bean is a singleton
 * @param argumentValues    Any argument values passed to create the bean
 * @param < T >               The bean generic type
 * @return The created bean
 */
protected <T>T doCreateBean(BeanResolutionContext resolutionContext,BeanDefinition<T> beanDefinition,Qualifier<T> qualifier,boolean isSingleton,Map<String,Object> argumentValues){
  BeanRegistration<T> beanRegistration=isSingleton && !beanDefinition.isIterable() ? singletonObjects.get(new BeanKey(beanDefinition.getBeanType(),qualifier)) : null;
  T bean;
  if (beanRegistration != null) {
    return beanRegistration.bean;
  }
  if (resolutionContext == null) {
    resolutionContext=new DefaultBeanResolutionContext(this,beanDefinition);
  }
  if (beanDefinition instanceof BeanFactory) {
    BeanFactory<T> beanFactory=(BeanFactory<T>)beanDefinition;
    try {
      if (beanFactory instanceof ParametrizedBeanFactory) {
        ParametrizedBeanFactory<T> parametrizedBeanFactory=(ParametrizedBeanFactory<T>)beanFactory;
        Argument<?>[] requiredArguments=parametrizedBeanFactory.getRequiredArguments();
        if (argumentValues == null) {
          throw new BeanInstantiationException(resolutionContext,"String_Node_Str" + beanDefinition.getBeanType().getName());
        }
        Map<String,Object> convertedValues=new LinkedHashMap<>(argumentValues);
        for (        Argument<?> requiredArgument : requiredArguments) {
          Object val=argumentValues.get(requiredArgument.getName());
          if (val == null && !requiredArgument.getAnnotationMetadata().hasDeclaredAnnotation(Nullable.class)) {
            throw new BeanInstantiationException(resolutionContext,"String_Node_Str" + requiredArgument + "String_Node_Str");
          }
          BeanResolutionContext finalResolutionContext=resolutionContext;
          if (val != null) {
            convertedValues.put(requiredArgument.getName(),ConversionService.SHARED.convert(val,requiredArgument).orElseThrow(() -> new BeanInstantiationException(finalResolutionContext,"String_Node_Str" + requiredArgument + "String_Node_Str"+ val+ "String_Node_Str"+ requiredArgument.getType())));
          }
        }
        bean=parametrizedBeanFactory.build(resolutionContext,this,beanDefinition,convertedValues);
      }
 else {
        bean=beanFactory.build(resolutionContext,this,beanDefinition);
        if (bean == null) {
          throw new BeanInstantiationException(resolutionContext,"String_Node_Str" + beanFactory + "String_Node_Str");
        }
      }
    }
 catch (    Throwable e) {
      if (e instanceof DependencyInjectionException) {
        throw e;
      }
      if (e instanceof BeanInstantiationException) {
        throw e;
      }
 else {
        if (!resolutionContext.getPath().isEmpty()) {
          throw new BeanInstantiationException(resolutionContext,e);
        }
 else {
          throw new BeanInstantiationException(beanDefinition,e);
        }
      }
    }
  }
 else {
    ConstructorInjectionPoint<T> constructor=beanDefinition.getConstructor();
    Argument[] requiredConstructorArguments=constructor.getArguments();
    if (requiredConstructorArguments.length == 0) {
      bean=constructor.invoke();
    }
 else {
      Object[] constructorArgs=new Object[requiredConstructorArguments.length];
      for (int i=0; i < requiredConstructorArguments.length; i++) {
        Class argument=requiredConstructorArguments[i].getType();
        constructorArgs[i]=getBean(resolutionContext,argument);
      }
      bean=constructor.invoke(constructorArgs);
    }
    inject(resolutionContext,null,bean);
  }
  if (!BeanCreatedEventListener.class.isInstance(bean)) {
    Collection<BeanCreatedEventListener> beanCreatedEventListeners=getBeansOfType(resolutionContext,BeanCreatedEventListener.class,Qualifiers.byTypeArguments(beanDefinition.getBeanType()));
    for (    BeanCreatedEventListener listener : beanCreatedEventListeners) {
      bean=(T)listener.onCreated(new BeanCreatedEvent(this,beanDefinition,bean));
      if (bean == null) {
        throw new BeanInstantiationException(resolutionContext,"String_Node_Str" + listener + "String_Node_Str");
      }
    }
  }
  if (beanDefinition instanceof ValidatedBeanDefinition) {
    bean=((ValidatedBeanDefinition<T>)beanDefinition).validate(resolutionContext,bean);
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str",bean,beanDefinition,qualifier);
  }
  return bean;
}

Fixed version (ground truth):
/** 
 * Execution the creation of a bean.
 * @param resolutionContext The {@link BeanResolutionContext}
 * @param beanDefinition    The {@link BeanDefinition}
 * @param qualifier         The {@link Qualifier}
 * @param isSingleton       Whether the bean is a singleton
 * @param argumentValues    Any argument values passed to create the bean
 * @param < T >               The bean generic type
 * @return The created bean
 */
protected <T>T doCreateBean(BeanResolutionContext resolutionContext,BeanDefinition<T> beanDefinition,Qualifier<T> qualifier,boolean isSingleton,Map<String,Object> argumentValues){
  BeanRegistration<T> beanRegistration=isSingleton && !beanDefinition.isIterable() ? singletonObjects.get(new BeanKey(beanDefinition.getBeanType(),qualifier)) : null;
  T bean;
  if (beanRegistration != null) {
    return beanRegistration.bean;
  }
  if (resolutionContext == null) {
    resolutionContext=new DefaultBeanResolutionContext(this,beanDefinition);
  }
  if (beanDefinition instanceof BeanFactory) {
    BeanFactory<T> beanFactory=(BeanFactory<T>)beanDefinition;
    try {
      if (beanFactory instanceof ParametrizedBeanFactory) {
        ParametrizedBeanFactory<T> parametrizedBeanFactory=(ParametrizedBeanFactory<T>)beanFactory;
        Argument<?>[] requiredArguments=parametrizedBeanFactory.getRequiredArguments();
        if (argumentValues == null) {
          throw new BeanInstantiationException(resolutionContext,"String_Node_Str" + beanDefinition.getBeanType().getName());
        }
        Map<String,Object> convertedValues=new LinkedHashMap<>(argumentValues);
        for (        Argument<?> requiredArgument : requiredArguments) {
          Object val=argumentValues.get(requiredArgument.getName());
          if (val == null && !requiredArgument.getAnnotationMetadata().hasDeclaredAnnotation(Nullable.class)) {
            throw new BeanInstantiationException(resolutionContext,"String_Node_Str" + requiredArgument + "String_Node_Str");
          }
          BeanResolutionContext finalResolutionContext=resolutionContext;
          Object convertedValue=null;
          if (val != null) {
            convertedValue=ConversionService.SHARED.convert(val,requiredArgument).orElseThrow(() -> new BeanInstantiationException(finalResolutionContext,"String_Node_Str" + requiredArgument + "String_Node_Str"+ val+ "String_Node_Str"+ requiredArgument.getType()));
          }
          convertedValues.put(requiredArgument.getName(),convertedValue);
        }
        bean=parametrizedBeanFactory.build(resolutionContext,this,beanDefinition,convertedValues);
      }
 else {
        bean=beanFactory.build(resolutionContext,this,beanDefinition);
        if (bean == null) {
          throw new BeanInstantiationException(resolutionContext,"String_Node_Str" + beanFactory + "String_Node_Str");
        }
      }
    }
 catch (    Throwable e) {
      if (e instanceof DependencyInjectionException) {
        throw e;
      }
      if (e instanceof BeanInstantiationException) {
        throw e;
      }
 else {
        if (!resolutionContext.getPath().isEmpty()) {
          throw new BeanInstantiationException(resolutionContext,e);
        }
 else {
          throw new BeanInstantiationException(beanDefinition,e);
        }
      }
    }
  }
 else {
    ConstructorInjectionPoint<T> constructor=beanDefinition.getConstructor();
    Argument[] requiredConstructorArguments=constructor.getArguments();
    if (requiredConstructorArguments.length == 0) {
      bean=constructor.invoke();
    }
 else {
      Object[] constructorArgs=new Object[requiredConstructorArguments.length];
      for (int i=0; i < requiredConstructorArguments.length; i++) {
        Class argument=requiredConstructorArguments[i].getType();
        constructorArgs[i]=getBean(resolutionContext,argument);
      }
      bean=constructor.invoke(constructorArgs);
    }
    inject(resolutionContext,null,bean);
  }
  if (!BeanCreatedEventListener.class.isInstance(bean)) {
    Collection<BeanCreatedEventListener> beanCreatedEventListeners=getBeansOfType(resolutionContext,BeanCreatedEventListener.class,Qualifiers.byTypeArguments(beanDefinition.getBeanType()));
    for (    BeanCreatedEventListener listener : beanCreatedEventListeners) {
      bean=(T)listener.onCreated(new BeanCreatedEvent(this,beanDefinition,bean));
      if (bean == null) {
        throw new BeanInstantiationException(resolutionContext,"String_Node_Str" + listener + "String_Node_Str");
      }
    }
  }
  if (beanDefinition instanceof ValidatedBeanDefinition) {
    bean=((ValidatedBeanDefinition<T>)beanDefinition).validate(resolutionContext,bean);
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str",bean,beanDefinition,qualifier);
  }
  return bean;
}