Program: 27315
Project: 27315
Buggy source:
/** 
 * Initialize the processing part of the broker.
 * @param props the properties carrier where some props like port end host could be loaded. For the full list check of configurable properties check moquette.conf file.
 * @param embeddedObservers a list of callbacks to be notified of certain events inside the broker. Could be empty list of null.
 * @param authenticator an implementation of the authenticator to be used, if null load that specified in config and fallback on the default one (permit all).
 * @param authorizator an implementation of the authorizator to be used, if null load that specified in config and fallback on the default one (permit all).
 * @param server the server to init.
 * @return the processor created for the broker.
 */
public ProtocolProcessor init(IConfig props,List<? extends InterceptHandler> embeddedObservers,IAuthenticator authenticator,IAuthorizator authorizator,Server server){
  IMessagesStore messagesStore;
  LOG.info("String_Node_Str");
  String storageClassName=props.getProperty(BrokerConstants.STORAGE_CLASS_NAME,INMEMDB_STORE_CLASS);
  if (storageClassName == null || storageClassName.isEmpty()) {
    LOG.error("String_Node_Str");
    throw new IllegalArgumentException("String_Node_Str");
  }
  final IStore store=instantiateConfiguredStore(storageClassName,props,server.getScheduler());
  if (store == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  store.initStore();
  messagesStore=store.messagesStore();
  m_sessionsStore=store.sessionsStore();
  SessionsRepository sessionsRepository=new SessionsRepository(this.m_sessionsStore,server.getScheduler());
  sessionsRepository.init();
  this.subscriptionsStore=m_sessionsStore.subscriptionStore();
  storeShutdown=new Runnable(){
    @Override public void run(){
      store.close();
    }
  }
;
  LOG.info("String_Node_Str");
  List<InterceptHandler> observers=new ArrayList<>(embeddedObservers);
  String interceptorClassName=props.getProperty(BrokerConstants.INTERCEPT_HANDLER_PROPERTY_NAME);
  if (interceptorClassName != null && !interceptorClassName.isEmpty()) {
    InterceptHandler handler=loadClass(interceptorClassName,InterceptHandler.class,Server.class,server);
    if (handler != null) {
      observers.add(handler);
    }
  }
  BrokerInterceptor interceptor=new BrokerInterceptor(props,observers);
  LOG.info("String_Node_Str");
  ISubscriptionsDirectory subscriptions=new CTrieSubscriptionDirectory();
  subscriptions.init(sessionsRepository);
  LOG.info("String_Node_Str");
  String authenticatorClassName=props.getProperty(BrokerConstants.AUTHENTICATOR_CLASS_NAME,"String_Node_Str");
  if (authenticator == null && !authenticatorClassName.isEmpty()) {
    authenticator=loadClass(authenticatorClassName,IAuthenticator.class,IConfig.class,props);
  }
  IResourceLoader resourceLoader=props.getResourceLoader();
  if (authenticator == null) {
    String passwdPath=props.getProperty(BrokerConstants.PASSWORD_FILE_PROPERTY_NAME,"String_Node_Str");
    if (passwdPath.isEmpty()) {
      authenticator=new AcceptAllAuthenticator();
    }
 else {
      authenticator=new ResourceAuthenticator(resourceLoader,passwdPath);
    }
    LOG.info("String_Node_Str",authenticator.getClass().getName());
  }
  LOG.info("String_Node_Str");
  String authorizatorClassName=props.getProperty(BrokerConstants.AUTHORIZATOR_CLASS_NAME,"String_Node_Str");
  if (authorizator == null && !authorizatorClassName.isEmpty()) {
    authorizator=loadClass(authorizatorClassName,IAuthorizator.class,IConfig.class,props);
  }
  if (authorizator == null) {
    String aclFilePath=props.getProperty(BrokerConstants.ACL_FILE_PROPERTY_NAME,"String_Node_Str");
    if (aclFilePath != null && !aclFilePath.isEmpty()) {
      authorizator=new DenyAllAuthorizator();
      try {
        LOG.info("String_Node_Str",aclFilePath);
        authorizator=ACLFileParser.parse(resourceLoader.loadResource(aclFilePath));
      }
 catch (      ParseException pex) {
        LOG.error("String_Node_Str" + aclFilePath,pex);
      }
    }
 else {
      authorizator=new PermitAllAuthorizator();
    }
    LOG.info("String_Node_Str",authorizator.getClass().getName());
  }
  LOG.info("String_Node_Str");
  connectionDescriptors=new ConnectionDescriptorStore();
  LOG.info("String_Node_Str");
  boolean allowAnonymous=Boolean.parseBoolean(props.getProperty(BrokerConstants.ALLOW_ANONYMOUS_PROPERTY_NAME,"String_Node_Str"));
  boolean allowZeroByteClientId=Boolean.parseBoolean(props.getProperty(BrokerConstants.ALLOW_ZERO_BYTE_CLIENT_ID_PROPERTY_NAME,"String_Node_Str"));
  m_processor.init(connectionDescriptors,subscriptions,messagesStore,m_sessionsStore,authenticator,allowAnonymous,allowZeroByteClientId,authorizator,interceptor,sessionsRepository);
  return m_processor;
}

Fixed version (ground truth):
/** 
 * Initialize the processing part of the broker.
 * @param props the properties carrier where some props like port end host could be loaded. For the full list check of configurable properties check moquette.conf file.
 * @param embeddedObservers a list of callbacks to be notified of certain events inside the broker. Could be empty list of null.
 * @param authenticator an implementation of the authenticator to be used, if null load that specified in config and fallback on the default one (permit all).
 * @param authorizator an implementation of the authorizator to be used, if null load that specified in config and fallback on the default one (permit all).
 * @param server the server to init.
 * @return the processor created for the broker.
 */
public ProtocolProcessor init(IConfig props,List<? extends InterceptHandler> embeddedObservers,IAuthenticator authenticator,IAuthorizator authorizator,Server server){
  IMessagesStore messagesStore;
  LOG.info("String_Node_Str");
  String storageClassName=props.getProperty(BrokerConstants.STORAGE_CLASS_NAME,INMEMDB_STORE_CLASS);
  if (storageClassName == null || storageClassName.isEmpty()) {
    LOG.error("String_Node_Str");
    throw new IllegalArgumentException("String_Node_Str");
  }
  final IStore store=instantiateConfiguredStore(storageClassName,props,server.getScheduler());
  if (store == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  store.initStore();
  messagesStore=store.messagesStore();
  m_sessionsStore=store.sessionsStore();
  SessionsRepository sessionsRepository=new SessionsRepository(this.m_sessionsStore,server.getScheduler());
  sessionsRepository.init();
  this.subscriptionsStore=m_sessionsStore.subscriptionStore();
  storeShutdown=new Runnable(){
    @Override public void run(){
      store.close();
    }
  }
;
  LOG.info("String_Node_Str");
  List<InterceptHandler> observers=new ArrayList<>(embeddedObservers);
  String interceptorClassName=props.getProperty(BrokerConstants.INTERCEPT_HANDLER_PROPERTY_NAME);
  if (interceptorClassName != null && !interceptorClassName.isEmpty()) {
    InterceptHandler handler=loadClass(interceptorClassName,InterceptHandler.class,Server.class,server);
    if (handler != null) {
      observers.add(handler);
    }
  }
  BrokerInterceptor interceptor=new BrokerInterceptor(props,observers);
  LOG.info("String_Node_Str");
  ISubscriptionsDirectory subscriptions=new CTrieSubscriptionDirectory();
  subscriptions.init(sessionsRepository);
  LOG.info("String_Node_Str");
  String authenticatorClassName=props.getProperty(BrokerConstants.AUTHENTICATOR_CLASS_NAME,"String_Node_Str");
  if (authenticator == null && !authenticatorClassName.isEmpty()) {
    authenticator=loadClass(authenticatorClassName,IAuthenticator.class,IConfig.class,props);
  }
  IResourceLoader resourceLoader=props.getResourceLoader();
  if (authenticator == null) {
    String passwdPath=props.getProperty(BrokerConstants.PASSWORD_FILE_PROPERTY_NAME,"String_Node_Str");
    if (passwdPath.isEmpty()) {
      authenticator=new AcceptAllAuthenticator();
    }
 else {
      authenticator=new ResourceAuthenticator(resourceLoader,passwdPath);
    }
    LOG.info("String_Node_Str",authenticator.getClass().getName());
  }
  LOG.info("String_Node_Str");
  String authorizatorClassName=props.getProperty(BrokerConstants.AUTHORIZATOR_CLASS_NAME,"String_Node_Str");
  if (authorizator == null && !authorizatorClassName.isEmpty()) {
    authorizator=loadClass(authorizatorClassName,IAuthorizator.class,IConfig.class,props);
  }
  if (authorizator == null) {
    String aclFilePath=props.getProperty(BrokerConstants.ACL_FILE_PROPERTY_NAME,"String_Node_Str");
    if (aclFilePath != null && !aclFilePath.isEmpty()) {
      authorizator=new DenyAllAuthorizator();
      try {
        LOG.info("String_Node_Str",aclFilePath);
        authorizator=ACLFileParser.parse(resourceLoader.loadResource(aclFilePath));
      }
 catch (      ParseException pex) {
        LOG.error("String_Node_Str" + aclFilePath,pex);
      }
    }
 else {
      authorizator=new PermitAllAuthorizator();
    }
    LOG.info("String_Node_Str",authorizator.getClass().getName());
  }
  LOG.info("String_Node_Str");
  connectionDescriptors=new ConnectionDescriptorStore();
  LOG.info("String_Node_Str");
  boolean allowAnonymous=props.boolProp(BrokerConstants.ALLOW_ANONYMOUS_PROPERTY_NAME,true);
  boolean allowZeroByteClientId=props.boolProp(BrokerConstants.ALLOW_ZERO_BYTE_CLIENT_ID_PROPERTY_NAME,false);
  boolean reauthorizeSubscriptionsOnConnect=props.boolProp(BrokerConstants.REAUTHORIZE_SUBSCRIPTIONS_ON_CONNECT,false);
  m_processor.init(connectionDescriptors,subscriptions,messagesStore,m_sessionsStore,authenticator,allowAnonymous,allowZeroByteClientId,authorizator,interceptor,sessionsRepository,reauthorizeSubscriptionsOnConnect);
  return m_processor;
}