Program: 87147
Project: 87147
Buggy source:
@Override public void init(SpliffyResourceFactory resourceFactory,AppConfig config) throws Exception {
  smtpPort=config.getInt("String_Node_Str");
  Properties props=new Properties();
  String hostName=config.getContext().get(CurrentRootFolderService.class).getPrimaryDomain();
  props.setProperty(ConfigurationMBean.PARAM_HOSTNAME,hostName);
  aspirinConfiguration=new Configuration(props);
  batchEmailService=new BatchEmailService();
  groupEmailService=new GroupEmailService(batchEmailService);
  config.getContext().put(groupEmailService);
  securityManager=resourceFactory.getSecurityManager();
  mailResourceFactory=new MiltonCloudMailResourceFactory(resourceFactory);
  this.currentDateService=config.getContext().get(CurrentDateService.class);
  queueStore=new EmailItemQueueStore(resourceFactory.getSessionManager(),aspirinConfiguration,listenerManager,currentDateService);
  StandardMessageFactory smf=new StandardMessageFactoryImpl();
  mailStore=new EmailItemMailStore(resourceFactory.getSessionManager(),smf);
  mailFilter=new MCMailFilter(resourceFactory.getSessionManager(),config.getContext());
  resourceFactory.getApplicationManager().getEmailTriggerTypes().add(new SubscriptionEventTriggerType());
  MailServerBuilder mailServerBuilder=new MailServerBuilder();
  mailServerBuilder.setListenerManager(listenerManager);
  mailServerBuilder.setAspirinConfiguration(aspirinConfiguration);
  mailServerBuilder.setMailResourceFactory(mailResourceFactory);
  mailServerBuilder.setEnablePop(false);
  mailServerBuilder.setEnableMsa(false);
  mailServerBuilder.setSmtpPort(smtpPort);
  mailServerBuilder.setMailStore(mailStore);
  mailServerBuilder.setQueueStore(queueStore);
  List<Filter> filters=new ArrayList<>();
  filters.add(mailFilter);
  mailServerBuilder.setFilters(Collections.unmodifiableList(filters));
  mailServer=mailServerBuilder.build();
  mailStore.setAspirinInternal(mailServerBuilder.getAspirinInternal());
  mailServer.start();
  eventManager=config.getContext().get(EventManager.class);
  eventManager.registerEventListener(this,SubscriptionEvent.class);
  asynchProcessor=config.getContext().get(AsynchProcessor.class);
}

Fixed version (ground truth):
@Override public void init(SpliffyResourceFactory resourceFactory,AppConfig config) throws Exception {
  smtpPort=config.getInt("String_Node_Str");
  Properties props=new Properties();
  String hostName=config.getContext().get(CurrentRootFolderService.class).getPrimaryDomain();
  props.setProperty(ConfigurationMBean.PARAM_HOSTNAME,hostName);
  aspirinConfiguration=new Configuration(props);
  batchEmailService=new BatchEmailService();
  groupEmailService=new GroupEmailService(batchEmailService);
  config.getContext().put(groupEmailService);
  securityManager=resourceFactory.getSecurityManager();
  mailResourceFactory=new MiltonCloudMailResourceFactory(resourceFactory);
  this.currentDateService=config.getContext().get(CurrentDateService.class);
  queueStore=new EmailItemQueueStore(resourceFactory.getSessionManager(),aspirinConfiguration,listenerManager,currentDateService);
  StandardMessageFactory smf=new StandardMessageFactoryImpl();
  mailStore=new EmailItemMailStore(resourceFactory.getSessionManager(),smf);
  mailFilter=new MCMailFilter(resourceFactory.getSessionManager(),config.getContext());
  emailTriggerService=new EmailTriggerService(batchEmailService);
  config.getContext().put(emailTriggerService);
  resourceFactory.getApplicationManager().getEmailTriggerTypes().add(new SubscriptionEventTriggerType());
  MailServerBuilder mailServerBuilder=new MailServerBuilder();
  mailServerBuilder.setListenerManager(listenerManager);
  mailServerBuilder.setAspirinConfiguration(aspirinConfiguration);
  mailServerBuilder.setMailResourceFactory(mailResourceFactory);
  mailServerBuilder.setEnablePop(false);
  mailServerBuilder.setEnableMsa(false);
  mailServerBuilder.setSmtpPort(smtpPort);
  mailServerBuilder.setMailStore(mailStore);
  mailServerBuilder.setQueueStore(queueStore);
  List<Filter> filters=new ArrayList<>();
  filters.add(mailFilter);
  mailServerBuilder.setFilters(Collections.unmodifiableList(filters));
  mailServer=mailServerBuilder.build();
  mailStore.setAspirinInternal(mailServerBuilder.getAspirinInternal());
  mailServer.start();
  eventManager=config.getContext().get(EventManager.class);
  eventManager.registerEventListener(this,TriggerEvent.class);
  asynchProcessor=config.getContext().get(AsynchProcessor.class);
}