#vulnerable code 
                             public static <T> T getInstance(BeanManager beanManager, Class<T> beanClass, boolean create) {
		return getInstance(beanManager, resolve(beanManager, beanClass), create);
	} 
                            #location 2 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             public static <T> T getInstance(BeanManager beanManager, Class<T> beanClass, boolean create) {
		Bean<T> bean = resolve(beanManager, beanClass);
		return (bean != null) ? getInstance(beanManager, bean, create) : null;
	}