Program: 27313
Project: 27313
Buggy source:
/** 
 * @param subscriptions the subscription store where are stored all the existing clients subscriptions.
 * @param storageService the persistent store to use for save/load of messages for QoS1 and QoS2 handling.
 * @param sessionsStore the clients sessions store, used to persist subscriptions.
 * @param authenticator the authenticator used in connect messages.
 * @param allowAnonymous true connection to clients without credentials.
 * @param allowZeroByteClientId true to allow clients connect without a clientid
 * @param authorizator used to apply ACL policies to publishes and subscriptions.
 * @param interceptor to notify events to an intercept handler
 */
void init(IConnectionsManager connectionDescriptors,ISubscriptionsDirectory subscriptions,IMessagesStore storageService,ISessionsStore sessionsStore,IAuthenticator authenticator,boolean allowAnonymous,boolean allowZeroByteClientId,IAuthorizator authorizator,BrokerInterceptor interceptor,SessionsRepository sessionsRepository){
  LOG.debug("String_Node_Str");
  this.connectionDescriptors=connectionDescriptors;
  this.subscriptionInCourse=new ConcurrentHashMap<>();
  this.m_interceptor=interceptor;
  this.subscriptions=subscriptions;
  this.allowAnonymous=allowAnonymous;
  this.allowZeroByteClientId=allowZeroByteClientId;
  m_authorizator=authorizator;
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str",subscriptions.dumpTree());
  }
  m_authenticator=authenticator;
  m_messagesStore=storageService;
  m_sessionsStore=sessionsStore;
  this.sessionsRepository=sessionsRepository;
  LOG.info("String_Node_Str");
  final PersistentQueueMessageSender messageSender=new PersistentQueueMessageSender(this.connectionDescriptors);
  this.messagesPublisher=new MessagesPublisher(connectionDescriptors,messageSender,subscriptions,this.sessionsRepository);
  LOG.debug("String_Node_Str");
  this.qos0PublishHandler=new Qos0PublishHandler(m_authorizator,m_messagesStore,m_interceptor,this.messagesPublisher);
  this.qos1PublishHandler=new Qos1PublishHandler(m_authorizator,m_messagesStore,m_interceptor,this.connectionDescriptors,this.messagesPublisher);
  this.qos2PublishHandler=new Qos2PublishHandler(m_authorizator,subscriptions,m_messagesStore,m_interceptor,this.connectionDescriptors,this.messagesPublisher,this.sessionsRepository);
  LOG.debug("String_Node_Str");
  this.internalRepublisher=new InternalRepublisher(messageSender);
}

Fixed version (ground truth):
/** 
 * @param subscriptions the subscription store where are stored all the existing clients subscriptions.
 * @param storageService the persistent store to use for save/load of messages for QoS1 and QoS2 handling.
 * @param sessionsStore the clients sessions store, used to persist subscriptions.
 * @param authenticator the authenticator used in connect messages.
 * @param allowAnonymous true connection to clients without credentials.
 * @param allowZeroByteClientId true to allow clients connect without a clientid
 * @param authorizator used to apply ACL policies to publishes and subscriptions.
 * @param interceptor to notify events to an intercept handler
 */
void init(IConnectionsManager connectionDescriptors,ISubscriptionsDirectory subscriptions,IMessagesStore storageService,ISessionsStore sessionsStore,IAuthenticator authenticator,boolean allowAnonymous,boolean allowZeroByteClientId,IAuthorizator authorizator,BrokerInterceptor interceptor,SessionsRepository sessionsRepository,boolean reauthorizeSubscriptionsOnConnect){
  LOG.debug("String_Node_Str");
  this.connectionDescriptors=connectionDescriptors;
  this.subscriptionInCourse=new ConcurrentHashMap<>();
  this.m_interceptor=interceptor;
  this.subscriptions=subscriptions;
  this.allowAnonymous=allowAnonymous;
  this.reauthorizeSubscriptionsOnConnect=reauthorizeSubscriptionsOnConnect;
  this.allowZeroByteClientId=allowZeroByteClientId;
  m_authorizator=authorizator;
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str",subscriptions.dumpTree());
  }
  m_authenticator=authenticator;
  m_messagesStore=storageService;
  m_sessionsStore=sessionsStore;
  this.sessionsRepository=sessionsRepository;
  LOG.info("String_Node_Str");
  final PersistentQueueMessageSender messageSender=new PersistentQueueMessageSender(this.connectionDescriptors);
  this.messagesPublisher=new MessagesPublisher(connectionDescriptors,messageSender,subscriptions,this.sessionsRepository);
  LOG.debug("String_Node_Str");
  this.qos0PublishHandler=new Qos0PublishHandler(m_authorizator,m_messagesStore,m_interceptor,this.messagesPublisher);
  this.qos1PublishHandler=new Qos1PublishHandler(m_authorizator,m_messagesStore,m_interceptor,this.connectionDescriptors,this.messagesPublisher);
  this.qos2PublishHandler=new Qos2PublishHandler(m_authorizator,subscriptions,m_messagesStore,m_interceptor,this.connectionDescriptors,this.messagesPublisher,this.sessionsRepository);
  LOG.debug("String_Node_Str");
  this.internalRepublisher=new InternalRepublisher(messageSender);
}