Buggy code:
private final String [ ] beanRepositoryIds ; private final String [ ] homeRepositoryIds ; private final boolean useQualifiedName ; private final Module module ; private ServantRegistry homeServantRegistry ; private ServantRegistry beanServantRegistry ; private ReferenceFactory beanReferenceFactory ; private EJBHome ejbHome ; private InterfaceRepository iri ; private final InjectedValue < POA > irPoa = new InjectedValue < POA > ( ) ; private final InjectedValue < IORSecurityConfigMetaData > iorSecConfigMetaData = new InjectedValue < IORSecurityConfigMetaData > ( ) ; private IIOPMetaData iiopMetaData ; private String name = null ; public EjbIIOPService ( final Map < String , SkeletonStrategy > beanMethodMap , final String [ ] beanRepositoryIds , final Map < String , SkeletonStrategy > homeMethodMap , final String [ ] homeRepositoryIds , final boolean useQualifiedName , final IIOPMetaData iiopMetaData , final Module module ) { } public synchronized void start ( final StartContext startContext ) throws StartException { try { final RiverMarshallerFactory factory = new RiverMarshallerFactory ( ) ; final MarshallingConfiguration configuration = new MarshallingConfiguration ( ) ; configuration . setClassResolver ( ModularClassResolver . getInstance ( serviceModuleLoaderInjectedValue . getValue ( ) ) ) ; this . configuration = configuration ; this . factory = factory ; final boolean interfaceRepositorySupported = false ; final EJBComponent component = ejbComponentInjectedValue . getValue ( ) ; final String earApplicationName = component . getEarApplicationName ( ) ; if ( ( ( iiopMetaData ) != null ) && ( ( iiopMetaData . getBindingName ( ) ) != null ) ) { name = iiopMetaData . getBindingName ( ) ; } else if ( useQualifiedName ) { if ( ( ( component . getDistinctName ( ) ) == null ) || ( component . getDistinctName ( ) . isEmpty ( ) ) ) { name = ( ( earApplicationName == null ) || ( earApplicationName . isEmpty ( ) ) ) ? "" : earApplicationName + "//" ; name = ( ( ( name ) + ( component . getModuleName ( ) ) ) + "//" ) + ( component . getComponentName ( ) ) ; } else { name = ( ( earApplicationName == null ) || ( earApplicationName . isEmpty ( ) ) ) ? "" : earApplicationName + "//" ; name = ( ( ( ( ( name ) + ( component . getModuleName ( ) ) ) + "//" ) + ( component . getDistinctName ( ) ) ) + "//" ) + ( component . getComponentName ( ) ) ; } } else { name = component . getComponentName ( ) ; } name = name . replace ( "." , "_" ) ; final ORB orb = this . orb . getValue ( ) ; if ( interfaceRepositorySupported ) { iri = new InterfaceRepository ( orb , irPoa . getValue ( ) , name ) ; iri . mapClass ( remoteView . getValue ( ) . getViewClass ( ) ) ; iri . mapClass ( homeView . getValue ( ) . getViewClass ( ) ) ; iri . finishBuild ( ) ; ROOT_LOGGER . cobraInterfaceRepository ( name , orb . object_to_string ( iri . getReference ( ) ) ) ; } IORSecurityConfigMetaData iorSecurityConfigMetaData = this . iorSecConfigMetaData . getOptionalValue ( ) ; if ( ( ( this . iiopMetaData ) != null ) && ( ( this . iiopMetaData . getIorSecurityConfigMetaData ( ) ) != null ) ) iorSecurityConfigMetaData = this . iiopMetaData . getIorSecurityConfigMetaData ( ) ; List < Policy > policyList = new ArrayList < Policy > ( ) ; if ( iorSecurityConfigMetaData != null ) { final Any secPolicy = orb . create_any ( ) ; secPolicy . insert_Value ( iorSecurityConfigMetaData ) ; Policy csiv2Policy = orb . create_policy ( TYPE , secPolicy ) ; policyList . add ( csiv2Policy ) ; boolean sslRequired = false ; <START_BUG> if ( iorSecurityConfigMetaData != null ) { <END_BUG> IORTransportConfigMetaData tc = iorSecurityConfigMetaData . getTransportConfig ( ) ; sslRequired = ( ( INTEGRITY_REQUIRED . equals ( tc . getIntegrity ( ) ) ) || ( CONFIDENTIALITY_REQUIRED . equals ( tc . getConfidentiality ( ) ) ) ) || ( ESTABLISH_TRUST_IN_CLIENT_REQUIRED . equals ( tc . getEstablishTrustInClient ( ) ) ) ; } final Any sslPolicyValue = orb . create_any ( ) ; SSLPolicyValueHelper . insert ( sslPolicyValue , ( sslRequired ? SSLPolicyValue . SSL_REQUIRED : SSLPolicyValue . SSL_NOT_REQUIRED ) ) ; Policy sslPolicy = orb . create_policy ( value , sslPolicyValue ) ; policyList . add ( sslPolicy ) ; ROOT_LOGGER . debug ( ( "container's<seq2seq4repair_space>SSL<seq2seq4repair_space>policy:<seq2seq4repair_space>" + sslPolicy ) ) ; } String securityDomain = "CORBA_REMOTE" ; if ( ( component . getSecurityMetaData ( ) ) != null ) { securityDomain = component . getSecurityMetaData ( ) . getSecurityDomain ( ) ; } Policy [ ] policies = policyList . toArray ( new Policy [ policyList . size ( ) ] ) ; InterfaceDef homeInterfaceDef = null ; if ( ( iri ) != null ) { Repository ir = iri . getReference ( ) ; homeInterfaceDef = InterfaceDefHelper . narrow ( ir . lookup_id ( homeRepositoryIds [ 0 ] ) ) ; } Current poaCurrent = CurrentHelper . narrow ( orb . resolve_initial_references ( "POACurrent" ) ) ; final EjbCorbaServant homeServant = new EjbCorbaServant ( poaCurrent , homeMethodMap , homeRepositoryIds , homeInterfaceDef , orb , homeView . getValue ( ) , factory , configuration , component . getTransactionManager ( ) , module . getClassLoader ( ) , true , securityDomain ) ; homeServantRegistry = poaRegistry . getValue ( ) . getRegistryWithPersistentPOAPerServant ( ) ; ReferenceFactory homeReferenceFactory = homeServantRegistry . bind ( EjbIIOPService . homeServantName ( name ) , homeServant , policies ) ; final org . omg . CORBA . Object corbaRef = homeReferenceFactory . createReference ( homeRepositoryIds [ 0 ] ) ; ejbHome = ( ( EJBHome ) ( PortableRemoteObject . narrow ( corbaRef , EJBHome . class ) ) ) ; final HomeHandleImplIIOP homeHandle = new HomeHandleImplIIOP ( orb . object_to_string ( corbaRef ) ) ; homeServant . setHomeHandle ( homeHandle ) ;

Fix:
if ( ( iorSecurityConfigMetaData != null ) && ( ( iorSecurityConfigMetaData . getTransportConfig ( ) ) != null ) ) {