Buggy code:
public class POARegistry implements Service < POARegistry > { public static final ServiceName SERVICE_NAME = JBOSS . append ( "ejb" , "iiop" , "POARegistry" ) ; public static final byte [ ] EMPTY_BYTES = new byte [ ] { } ; private final InjectedValue < POA > rootPOA = new InjectedValue < POA > ( ) ; private ServantRegistry registryWithTransientPOAPerServant ; private Map < String , POA > transientPoaMap ; private Policy [ ] transientPoaPolicies ; private ServantRegistry registryWithPersistentPOAPerServant ; private Map < String , POA > persistentPoaMap ; private Policy [ ] persistentPoaPolicies ; public synchronized void start ( final StartContext startContext ) throws StartException { transientPoaMap = Collections . synchronizedMap ( new HashMap < String , POA > ( ) ) ; persistentPoaMap = Collections . synchronizedMap ( new HashMap < String , POA > ( ) ) ; final POA rootPOA = this . rootPOA . getValue ( ) ; <START_BUG> transientPoaPolicies = new Policy [ ] { rootPOA . create_lifespan_policy ( LifespanPolicyValue . TRANSIENT ) , rootPOA . create_id_assignment_policy ( IdAssignmentPolicyValue . USER_ID ) , rootPOA . create_servant_retention_policy ( ServantRetentionPolicyValue . NON_RETAIN ) , rootPOA . create_request_processing_policy ( RequestProcessingPolicyValue . USE_DEFAULT_SERVANT ) , rootPOA . create_id_uniqueness_policy ( IdUniquenessPolicyValue . MULTIPLE_ID ) } ; <END_BUG> persistentPoaPolicies = new Policy [ ] { rootPOA . create_lifespan_policy ( LifespanPolicyValue . PERSISTENT ) , rootPOA . create_id_assignment_policy ( IdAssignmentPolicyValue . USER_ID ) , rootPOA . create_servant_retention_policy ( ServantRetentionPolicyValue . NON_RETAIN ) , rootPOA . create_request_processing_policy ( RequestProcessingPolicyValue . USE_DEFAULT_SERVANT ) , rootPOA . create_id_uniqueness_policy ( IdUniquenessPolicyValue . MULTIPLE_ID ) } ; registryWithTransientPOAPerServant = new POARegistry . ServantRegistryWithTransientPOAPerServant ( ) ; registryWithPersistentPOAPerServant = new POARegistry . ServantRegistryWithPersistentPOAPerServant ( ) ; } public synchronized void stop ( final StopContext context ) { } private static Policy [ ] concatPolicies ( Policy [ ] policies1 , Policy [ ] policies2 ) { } @ Override public synchronized POARegistry getValue ( ) throws IllegalArgumentException , IllegalStateException { } static class PoaReferenceFactory implements ReferenceFactory { private final POA poa ; private final String servantName ; private final Policy [ ] policies ; PoaReferenceFactory ( final POA poa , final String servantName , final Policy [ ] policies ) { } PoaReferenceFactory ( final POA poa , final String servantName ) { } PoaReferenceFactory ( final POA poa ) { } public org . omg . CORBA . Object createReference ( final String interfId ) throws Exception { } public org . omg . CORBA . Object createReferenceWithId ( final byte [ ] id , final String interfId ) throws Exception { } public POA getPOA ( ) { } } class ServantRegistryWithTransientPOAPerServant implements ServantRegistry { public ReferenceFactory bind ( final String name , final Servant servant , final Policy [ ] policies ) throws Exception { } public ReferenceFactory bind ( final String name , final Servant servant ) throws Exception { } public void unbind ( final String name ) throws Exception { } } class ServantRegistryWithPersistentPOAPerServant implements ServantRegistry { public ReferenceFactory bind ( final String name , final Servant servant , final Policy [ ] policies ) throws Exception { } public ReferenceFactory bind ( final String name , final Servant servant ) throws Exception { } public void unbind ( final String name ) throws Exception { } } public ServantRegistry getRegistryWithTransientPOAPerServant ( ) { } public ServantRegistry getRegistryWithPersistentPOAPerServant ( ) { } public InjectedValue < POA > getRootPOA ( ) { } }

Fix:
transientPoaPolicies = new Policy [ ] { rootPOA . create_lifespan_policy ( LifespanPolicyValue . TRANSIENT ) , rootPOA . create_id_assignment_policy ( IdAssignmentPolicyValue . SYSTEM_ID ) , rootPOA . create_servant_retention_policy ( ServantRetentionPolicyValue . NON_RETAIN ) , rootPOA . create_request_processing_policy ( RequestProcessingPolicyValue . USE_DEFAULT_SERVANT ) , rootPOA . create_id_uniqueness_policy ( IdUniquenessPolicyValue . MULTIPLE_ID ) } ;