Buggy code:
public class EJBUtilities implements EndpointDeployer , Service < EJBUtilities > { private static final Logger logger = Logger . getLogger ( "org.jboss.ejb3" ) ; private static final Map < String , String > knownRar = new HashMap < String , String > ( 1 ) ; public static final ServiceName SERVICE_NAME = JBOSS . append ( "ejb" , "utilities" ) ; private final InjectedValue < MetadataRepository > mdrValue = new InjectedValue < MetadataRepository > ( ) ; private final InjectedValue < ResourceAdapterRepository > resourceAdapterRepositoryValue = new InjectedValue < ResourceAdapterRepository > ( ) ; private final InjectedValue < SimpleSecurityManager > securityManagerValue = new InjectedValue < SimpleSecurityManager > ( ) ; private final InjectedValue < TransactionManager > transactionManagerValue = new InjectedValue < TransactionManager > ( ) ; private final InjectedValue < TransactionSynchronizationRegistry > transactionSynchronizationRegistryValue = new InjectedValue < TransactionSynchronizationRegistry > ( ) ; private final InjectedValue < UserTransaction > userTransactionValue = new InjectedValue < UserTransaction > ( ) ; public ActivationSpec createActivationSpecs ( final String resourceAdapterName , final Class < ? > messageListenerInterface , final Properties activationConfigProperties , final ClassLoader classLoader ) { try { ActivationSpec activationSpec = null ; boolean raFound = false ; String packageName = EJBUtilities . knownRar . get ( resourceAdapterName ) ; if ( packageName != null ) { raFound = true ; } if ( ! raFound ) { for ( String id : getMdr ( ) . getResourceAdapters ( ) ) { if ( ( getMdr ( ) . getRoot ( id ) . getName ( ) . indexOf ( resourceAdapterName ) ) != ( - 1 ) ) { if ( ! raFound ) { ResourceAdapter ra = getMdr ( ) . getResourceAdapter ( id ) . getResourceadapter ( ) ; if ( ( ra instanceof ResourceAdapter1516 ) && ( ( ( ( ResourceAdapter1516 ) ( ra ) ) . getInboundResourceadapter ( ) ) != null ) ) { String className = ( ( ResourceAdapter1516 ) ( ra ) ) . getResourceadapterClass ( ) ; if ( ( className . lastIndexOf ( "." ) ) != ( - 1 ) ) packageName = className . substring ( 0 , className . lastIndexOf ( "." ) ) ; else packageName = "" ; raFound = true ; } } else { throw new IllegalStateException ( ( "found<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>RA<seq2seq4repair_space>registered<seq2seq4repair_space>as<seq2seq4repair_space>" + resourceAdapterName ) ) ; } } } } if ( ! raFound ) { <START_BUG> throw new IllegalStateException ( ( "Not<seq2seq4repair_space>found<seq2seq4repair_space>RA<seq2seq4repair_space>registered<seq2seq4repair_space>as<seq2seq4repair_space>" + resourceAdapterName ) ) ; <END_BUG> } Set < String > ids = getResourceAdapterRepository ( ) . getResourceAdapters ( messageListenerInterface ) ; List < MessageListener > listeners = null ; boolean found = false ; for ( String id : ids ) { if ( id . startsWith ( packageName ) ) { if ( ! found ) { listeners = getResourceAdapterRepository ( ) . getMessageListeners ( id ) ; found = true ; } else { throw new IllegalStateException ( ( "found<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>RA<seq2seq4repair_space>registered<seq2seq4repair_space>" + resourceAdapterName ) ) ; } } } if ( found ) { final MessageListener messageListener = listeners . get ( 0 ) ; final Activation activation = messageListener . getActivation ( ) ; final Properties validActivationConfigProps = this . filterUnknownActivationConfigProperties ( resourceAdapterName , activation , activationConfigProperties ) ; activationSpec = activation . createInstance ( ) ; PropertyEditors . mapJavaBeanProperties ( activationSpec , validActivationConfigProps ) ; } return activationSpec ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } catch ( ResourceException e ) { throw new RuntimeException ( e ) ; } catch ( InstantiationException e ) { throw new RuntimeException ( e ) ; } catch ( NotFoundException e ) { throw new RuntimeException ( e ) ; } catch ( IntrospectionException e ) { throw new RuntimeException ( e ) ; } catch ( org . jboss . jca e ) { throw new RuntimeException ( e ) ; } } public MetadataRepository getMdr ( ) { } public Injector < MetadataRepository > getMdrInjector ( ) { } public ResourceAdapterRepository getResourceAdapterRepository ( ) { } public Injector < ResourceAdapterRepository > getResourceAdapterRepositoryInjector ( ) { } public SimpleSecurityManager getSecurityManager ( ) { } public Injector < SimpleSecurityManager > getSecurityManagerInjector ( ) { } public TransactionManager getTransactionManager ( ) { } public Injector < TransactionManager > getTransactionManagerInjector ( ) { } public InjectedValue < TransactionSynchronizationRegistry > getTransactionSynchronizationRegistryInjector ( ) { } public TransactionSynchronizationRegistry getTransactionSynchronizationRegistry ( ) { } public UserTransaction getUserTransaction ( ) { } public Injector < UserTransaction > getUserTransactionInjector ( ) { } @ Override public EJBUtilities getValue ( ) throws IllegalArgumentException , IllegalStateException { } public boolean hasSecurityManager ( ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override public void stop ( StopContext context ) { } private Properties filterUnknownActivationConfigProperties ( final String resourceAdapterName , final Activation activation , final Properties activationConfigProps ) { } }

Fix:
throw new IllegalStateException ( ( "No<seq2seq4repair_space>resource<seq2seq4repair_space>adapter<seq2seq4repair_space>registered<seq2seq4repair_space>with<seq2seq4repair_space>resource<seq2seq4repair_space>adapter<seq2seq4repair_space>name<seq2seq4repair_space>" + resourceAdapterName ) ) ;