Buggy code:
public class AnnotationBean extends AbstractConfig implements DisposableBean , BeanFactoryPostProcessor , BeanPostProcessor , ApplicationContextAware { private static final long serialVersionUID = - 7582802454287589552L ; private static final Logger logger = LoggerFactory . getLogger ( Logger . class ) ; private String annotationPackage ; private String [ ] annotationPackages ; private final Set < ServiceConfig < ? > > serviceConfigs = new com . alibaba . dubbo . common . utils . ConcurrentHashSet < ServiceConfig < ? > > ( ) ; private final ConcurrentMap < String , ReferenceBean < ? > > referenceConfigs = new ConcurrentHashMap < String , ReferenceBean < ? > > ( ) ; public String getPackage ( ) { } public void setPackage ( String annotationPackage ) { } private ApplicationContext applicationContext ; public void setApplicationContext ( ApplicationContext applicationContext ) throws BeansException { } public void postProcessBeanFactory ( ConfigurableListableBeanFactory beanFactory ) throws BeansException { } public void destroy ( ) throws Exception { } public Object postProcessAfterInitialization ( Object bean , String beanName ) throws BeansException { } public Object postProcessBeforeInitialization ( Object bean , String beanName ) throws BeansException { if ( ! ( isMatchPackage ( bean ) ) ) { return bean ; } Class < ? > clazz = bean . getClass ( ) ; if ( isProxyBean ( bean ) ) { clazz = AopUtils . getTargetClass ( bean ) ; } Method [ ] methods = clazz . getMethods ( ) ; for ( Method method : methods ) { String name = method . getName ( ) ; if ( ( ( ( ( ( name . length ( ) ) > 3 ) && ( name . startsWith ( "set" ) ) ) && ( ( method . getParameterTypes ( ) . length ) == 1 ) ) && ( Modifier . isPublic ( method . getModifiers ( ) ) ) ) && ( ! ( Modifier . isStatic ( method . getModifiers ( ) ) ) ) ) { try { Reference reference = method . getAnnotation ( Reference . class ) ; if ( reference != null ) { Object value = refer ( reference , method . getParameterTypes ( ) [ 0 ] ) ; if ( value != null ) { <START_BUG> method . invoke ( bean , new Object [ ] { } ) ; <END_BUG> } } } catch ( Exception e ) { throw new BeanInitializationException ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>init<seq2seq4repair_space>remote<seq2seq4repair_space>service<seq2seq4repair_space>reference<seq2seq4repair_space>at<seq2seq4repair_space>method<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>in<seq2seq4repair_space>class<seq2seq4repair_space>" ) + ( bean . getClass ( ) . getName ( ) ) ) , e ) ; } } } Field [ ] fields = clazz . getDeclaredFields ( ) ; for ( Field field : fields ) { try { if ( ! ( field . isAccessible ( ) ) ) { field . setAccessible ( true ) ; } Reference reference = field . getAnnotation ( Reference . class ) ; if ( reference != null ) { Object value = refer ( reference , field . getType ( ) ) ; if ( value != null ) { field . set ( bean , value ) ; } } } catch ( Exception e ) { throw new BeanInitializationException ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>init<seq2seq4repair_space>remote<seq2seq4repair_space>service<seq2seq4repair_space>reference<seq2seq4repair_space>at<seq2seq4repair_space>filed<seq2seq4repair_space>" + ( field . getName ( ) ) ) + "<seq2seq4repair_space>in<seq2seq4repair_space>class<seq2seq4repair_space>" ) + ( bean . getClass ( ) . getName ( ) ) ) , e ) ; } } return bean ; } private Object refer ( Reference reference , Class < ? > referenceClass ) { } private boolean isMatchPackage ( Object bean ) { } private boolean isProxyBean ( Object bean ) { } }

Fix:
method . invoke ( bean , new Object [ ] { value } ) ;