Program: 8760
Project: 8760
Buggy source:
/** 
 * Create a   {@code LoginContextProvider} using standard{@link javax.security.auth.login.Configuration#getConfiguration() JAAS}functionality. In case no login configuration for the specified app name can be retrieve this implementation uses the default as defined by  {@link org.apache.jackrabbit.oak.spi.security.authentication.ConfigurationUtil#getDefaultConfiguration(org.apache.jackrabbit.oak.spi.security.ConfigurationParameters)}. <p> The   {@link LoginContextProvider} implementation is intended to be used with<ul> <li>Regular login using JAAS  {@link javax.security.auth.spi.LoginModule} or</li><li>Pre-authenticated subjects in which case any authentication related validation is omitted</li> </ul> <h4>Configuration Options</h4> <ul> <li> {@link #PARAM_APP_NAME}: The appName passed to  {@code Configuration#getAppConfigurationEntry(String)}. The default value is   {@link #DEFAULT_APP_NAME}.</li> </ul>
 * @param contentRepository The content repository.
 * @return An new instance of {@link LoginContextProvider}.
 */
@Nonnull @Override public LoginContextProvider getLoginContextProvider(ContentRepository contentRepository){
  String appName=getParameters().getConfigValue(PARAM_APP_NAME,DEFAULT_APP_NAME);
  SecurityProvider provider=getSecurityProvider();
  Whiteboard whiteboard=null;
  if (provider instanceof WhiteboardAware) {
    whiteboard=((WhiteboardAware)provider).getWhiteboard();
  }
 else {
    log.warn("String_Node_Str");
  }
  return new LoginContextProviderImpl(appName,getParameters(),contentRepository,getSecurityProvider(),whiteboard);
}

Fixed version (ground truth):
/** 
 * Create a   {@code LoginContextProvider} using standard{@link javax.security.auth.login.Configuration#getConfiguration() JAAS}functionality. In case no login configuration for the specified app name can be retrieve this implementation uses the default as defined by  {@link org.apache.jackrabbit.oak.spi.security.authentication.ConfigurationUtil#getDefaultConfiguration(org.apache.jackrabbit.oak.spi.security.ConfigurationParameters)}. <p> The   {@link LoginContextProvider} implementation is intended to be used with<ul> <li>Regular login using JAAS  {@link javax.security.auth.spi.LoginModule} or</li><li>Pre-authenticated subjects in which case any authentication related validation is omitted</li> </ul> <h3>Configuration Options</h3> <ul> <li> {@link #PARAM_APP_NAME}: The appName passed to  {@code Configuration#getAppConfigurationEntry(String)}. The default value is   {@link #DEFAULT_APP_NAME}.</li> </ul>
 * @param contentRepository The content repository.
 * @return An new instance of {@link LoginContextProvider}.
 */
@Nonnull @Override public LoginContextProvider getLoginContextProvider(ContentRepository contentRepository){
  String appName=getParameters().getConfigValue(PARAM_APP_NAME,DEFAULT_APP_NAME);
  SecurityProvider provider=getSecurityProvider();
  Whiteboard whiteboard=null;
  if (provider instanceof WhiteboardAware) {
    whiteboard=((WhiteboardAware)provider).getWhiteboard();
  }
 else {
    log.warn("String_Node_Str");
  }
  return new LoginContextProviderImpl(appName,getParameters(),contentRepository,getSecurityProvider(),whiteboard);
}