Buggy code:
public class JNDIBasedSecurityManagement implements ISecurityManagement { private static final long serialVersionUID = 1924631329555621041L ; protected static Logger log = Logger . getLogger ( "org.jboss.as.security" ) ; private static JNDIBasedSecurityManagement INSTANCE = new JNDIBasedSecurityManagement ( ) ; private transient ConcurrentHashMap < String , SecurityDomainContext > securityMgrMap = new ConcurrentHashMap < String , SecurityDomainContext > ( ) ; private transient ConcurrentHashMap < String , AuthenticationManager > authMgrMap = new ConcurrentHashMap < String , AuthenticationManager > ( ) ; private transient ConcurrentHashMap < String , AuthorizationManager > authzMgrMap = new ConcurrentHashMap < String , AuthorizationManager > ( ) ; private transient ConcurrentHashMap < String , AuditManager > auditMgrMap = new ConcurrentHashMap < String , AuditManager > ( ) ; private transient ConcurrentHashMap < String , IdentityTrustManager > idmMgrMap = new ConcurrentHashMap < String , IdentityTrustManager > ( ) ; private transient ConcurrentHashMap < String , MappingManager > mappingMgrMap = new ConcurrentHashMap < String , MappingManager > ( ) ; private String authenticationManagerClassName ; private boolean deepCopySubjectMode ; private String callbackHandlerClassName ; private String authorizationManagerClassName ; private String auditManagerClassName ; private String identityTrustManagerClassName ; private String mappingManagerClassName ; private JNDIBasedSecurityManagement ( ) { } public static JNDIBasedSecurityManagement getInstance ( ) { } public ConcurrentHashMap < String , SecurityDomainContext > getSecurityManagerMap ( ) { } public AuditManager getAuditManager ( String securityDomain ) { } public AuthenticationManager getAuthenticationManager ( String securityDomain ) { } public AuthorizationManager getAuthorizationManager ( String securityDomain ) { } public IdentityTrustManager getIdentityTrustManager ( String securityDomain ) { } public MappingManager getMappingManager ( String securityDomain ) { } public String getAuthenticationManagerClassName ( ) { } public void setAuthenticationManagerClassName ( String authenticationManagerClassName ) { } public boolean isDeepCopySubjectMode ( ) { } public void setDeepCopySubjectMode ( boolean deepCopySubjectMode ) { } public String getCallbackHandlerClassName ( ) { } public void setCallbackHandlerClassName ( String callbackHandlerClassName ) { } public String getAuthorizationManagerClassName ( ) { } public void setAuthorizationManagerClassName ( String authorizationManagerClassName ) { } public String getAuditManagerClassName ( ) { } public void setAuditManagerClassName ( String auditManagerClassName ) { } public String getIdentityTrustManagerClassName ( ) { } public void setIdentityTrustManagerClassName ( String identityTrustManagerClassName ) { } public String getMappingManagerClassName ( ) { } public void setMappingManagerClassName ( String mappingManagerClassName ) { } private Object lookUpJNDI ( String contextName ) { Object result = null ; try { Context ctx = new InitialContext ( ) ; if ( contextName . startsWith ( JAAS_CONTEXT_ROOT ) ) result = ctx . lookup ( contextName ) ; else <START_BUG> result = ctx . lookup ( ( ( ( SecurityConstants . JAAS_CONTEXT_ROOT ) + "//" ) + contextName ) ) ; <END_BUG> } catch ( Exception e ) { JNDIBasedSecurityManagement . log . trace ( ( ( ( "Look<seq2seq4repair_space>up<seq2seq4repair_space>of<seq2seq4repair_space>JNDI<seq2seq4repair_space>for<seq2seq4repair_space>" + contextName ) + "<seq2seq4repair_space>failed<seq2seq4repair_space>with<seq2seq4repair_space>" ) + ( e . getLocalizedMessage ( ) ) ) ) ; return null ; } return result ; } public SecurityDomainContext createSecurityDomainContext ( String securityDomain ) throws Exception { } private AuthenticationManager createAuthenticationManager ( String securityDomain ) throws Exception { } private AuthorizationManager createAuthorizationManager ( String securityDomain ) throws Exception { } private AuditManager createAuditManager ( String securityDomain ) throws Exception { } private IdentityTrustManager createIdentityTrustManager ( String securityDomain ) throws Exception { } private MappingManager createMappingManager ( String securityDomain ) throws Exception { } private static void setDeepCopySubjectMode ( AuthenticationManager authenticationManager ) { } }

Fix:
result = ctx . lookup ( ( ( SecurityConstants . JAAS_CONTEXT_ROOT ) + contextName ) ) ;