Buggy code:
public abstract class AbstractDeploymentDescriptorBindingsProcessor implements DeploymentUnitProcessor { @ Override public final void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } protected abstract List < BindingDescription > processDescriptorEntries ( DeploymentUnit deploymentUnit , DeploymentDescriptorEnvironment environment , EEModuleDescription moduleDescription , AbstractComponentDescription componentDescription , ClassLoader classLoader , DeploymentReflectionIndex deploymentReflectionIndex ) throws DeploymentUnitProcessingException { } @ Override public void undeploy ( DeploymentUnit context ) { } protected Class < ? > processInjectionTargets ( ClassLoader classLoader , DeploymentReflectionIndex deploymentReflectionIndex , ResourceInjectionMetaDataWithDescriptions entry , BindingDescription description , Class < ? > classType ) throws DeploymentUnitProcessingException { if ( ( entry . getInjectionTargets ( ) ) != null ) { for ( ResourceInjectionTargetMetaData injectionTarget : entry . getInjectionTargets ( ) ) { final Class < ? > injectionTargetClass ; try { injectionTargetClass = classLoader . loadClass ( injectionTarget . getInjectionTargetClass ( ) ) ; } catch ( ClassNotFoundException e ) { throw new DeploymentUnitProcessingException ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>load<seq2seq4repair_space>" + ( injectionTarget . getInjectionTargetClass ( ) ) ) + "<seq2seq4repair_space>referenced<seq2seq4repair_space>in<seq2seq4repair_space>env-entry<seq2seq4repair_space>injection<seq2seq4repair_space>point<seq2seq4repair_space>" ) , e ) ; } final ClassReflectionIndex < ? > index = deploymentReflectionIndex . getClassIndex ( injectionTargetClass ) ; String methodName = ( "set" + ( injectionTarget . getInjectionTargetName ( ) . substring ( 0 , 1 ) . toUpperCase ( ) ) ) + ( injectionTarget . getInjectionTargetName ( ) . substring ( 1 ) ) ; boolean methodFound = false ; Method method = null ; Field field = null ; Class < ? > injectionTargetType = null ; String memberName = injectionTarget . getInjectionTargetName ( ) ; Class < ? > current = injectionTargetClass ; while ( ( ( current != ( Object . class ) ) && ( current != null ) ) && ( ! methodFound ) ) { final Collection < Method > methods = index . getAllMethods ( methodName ) ; for ( Method m : methods ) { if ( ( m . getParameterTypes ( ) . length ) == 1 ) { if ( ( m . isBridge ( ) ) || ( m . isSynthetic ( ) ) ) { continue ; } if ( methodFound ) { throw new DeploymentUnitProcessingException ( ( ( ( ( "Two<seq2seq4repair_space>setter<seq2seq4repair_space>methods<seq2seq4repair_space>for<seq2seq4repair_space>" + ( injectionTarget . getInjectionTargetName ( ) ) ) + "<seq2seq4repair_space>on<seq2seq4repair_space>class<seq2seq4repair_space>" ) + ( injectionTarget . getInjectionTargetClass ( ) ) ) + "<seq2seq4repair_space>found<seq2seq4repair_space>when<seq2seq4repair_space>applying<seq2seq4repair_space><injection-target><seq2seq4repair_space>for<seq2seq4repair_space>env-entry" ) ) ; } methodFound = true ; method = m ; injectionTargetType = m . getParameterTypes ( ) [ 0 ] ; memberName = methodName ; } } current = current . getSuperclass ( ) ; } if ( method == null ) { current = injectionTargetClass ; while ( ( ( current != ( Object . class ) ) && ( current != null ) ) && ( field == null ) ) { field = index . getField ( injectionTarget . getInjectionTargetName ( ) ) ; if ( field != null ) { injectionTargetType = field . getType ( ) ; memberName = injectionTarget . getInjectionTargetName ( ) ; break ; } current = current . getSuperclass ( ) ; } } if ( ( field == null ) && ( method == null ) ) { throw new DeploymentUnitProcessingException ( ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>resolve<seq2seq4repair_space>injection<seq2seq4repair_space>point<seq2seq4repair_space>" + ( injectionTarget . getInjectionTargetName ( ) ) ) + "<seq2seq4repair_space>on<seq2seq4repair_space>class<seq2seq4repair_space>" ) + ( injectionTarget . getInjectionTargetClass ( ) ) ) + "<seq2seq4repair_space>specified<seq2seq4repair_space>in<seq2seq4repair_space>web.xml" ) ) ; } if ( classType != null ) { if ( ! ( classType . isAssignableFrom ( injectionTargetType ) ) ) { throw new DeploymentUnitProcessingException ( ( ( ( ( "Injection<seq2seq4repair_space>target<seq2seq4repair_space>" + ( injectionTarget . getInjectionTargetName ( ) ) ) + "<seq2seq4repair_space>on<seq2seq4repair_space>class<seq2seq4repair_space>" ) + ( injectionTarget . getInjectionTargetClass ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>compatible<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>type<seq2seq4repair_space>of<seq2seq4repair_space>injection" ) ) ; } } else { classType = injectionTargetType ; } final InjectionTargetDescription injectionTargetDescription = new InjectionTargetDescription ( ) ; injectionTargetDescription . setClassName ( injectionTarget . getInjectionTargetClass ( ) ) ; if ( method == null ) { injectionTargetDescription . setType ( FIELD ) ; } else { injectionTargetDescription . setType ( METHOD ) ; } injectionTargetDescription . setName ( memberName ) ; <START_BUG> injectionTargetDescription . setValueClassName ( classType . getName ( ) ) ; <END_BUG> description . getInjectionTargetDescriptions ( ) . add ( injectionTargetDescription ) ; } } return classType ; } }

Fix:
injectionTargetDescription . setDeclaredValueClassName ( classType . getName ( ) ) ;