Program: 160585
Project: 160585
Buggy source:
/** 
 * Create a new BIMserver
 * @param homeDir A directory where the user can store instance specific configuration files
 * @param resourceFetcher A resource fetcher
 */
public BimServer(BimServerConfig config){
  this.config=config;
  try {
    if (config.getHomeDir() != null) {
      initHomeDir();
    }
    fixLogging();
    UncaughtExceptionHandler uncaughtExceptionHandler=new UncaughtExceptionHandler(){
      @Override public void uncaughtException(      Thread t,      Throwable e){
        if (e instanceof OutOfMemoryError) {
          serverInfoManager.setOutOfMemory();
          LOGGER.error("String_Node_Str",e);
        }
 else         if (e instanceof Error) {
          serverInfoManager.setErrorMessage(e.getMessage());
          LOGGER.error("String_Node_Str",e);
        }
 else {
          LOGGER.error("String_Node_Str",e);
        }
      }
    }
;
    Thread.setDefaultUncaughtExceptionHandler(uncaughtExceptionHandler);
    LOGGER=LoggerFactory.getLogger(BimServer.class);
    LOGGER.info("String_Node_Str");
    if (config.getHomeDir() != null) {
      LOGGER.info("String_Node_Str" + config.getHomeDir().getAbsolutePath() + "String_Node_Str");
    }
 else {
      LOGGER.info("String_Node_Str");
    }
    servicesMap=InterfaceList.createSServicesMap();
    LOGGER.debug("String_Node_Str");
    jsonSocketReflectorFactory=new JsonSocketReflectorFactory(servicesMap);
    LOGGER.debug("String_Node_Str");
    serverInfoManager=new ServerInfoManager();
    LOGGER.debug("String_Node_Str");
    notificationsManager=new NotificationsManager(this,jsonSocketReflectorFactory);
    LOGGER.debug("String_Node_Str");
    internalServicesManager=new InternalServicesManager(this,notificationsManager.getSiteAddress());
    LOGGER.debug("String_Node_Str");
    serviceFactory=new PublicInterfaceFactory(this);
    LOGGER.debug("String_Node_Str");
    pluginManager=new PluginManager(new File(config.getHomeDir(),"String_Node_Str"),config.getClassPath(),serviceFactory,internalServicesManager,servicesMap);
    LOGGER.debug("String_Node_Str");
    versionChecker=new VersionChecker(config.getResourceFetcher());
    LOGGER.debug("String_Node_Str");
    compareCache=new CompareCache();
    LOGGER.debug("String_Node_Str");
    if (config.isStartEmbeddedWebServer()) {
      embeddedWebServer=new EmbeddedWebServer(this,config.isLocalDev());
      LOGGER.debug("String_Node_Str");
    }
    LOGGER.debug("String_Node_Str");
  }
 catch (  Throwable e) {
    if (LOGGER == null) {
      e.printStackTrace();
    }
    LOGGER.error("String_Node_Str",e);
    serverInfoManager.setErrorMessage(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Create a new BIMserver
 * @param homeDir A directory where the user can store instance specific configuration files
 * @param resourceFetcher A resource fetcher
 */
public BimServer(BimServerConfig config){
  this.config=config;
  try {
    if (config.getHomeDir() != null) {
      initHomeDir();
    }
    fixLogging();
    UncaughtExceptionHandler uncaughtExceptionHandler=new UncaughtExceptionHandler(){
      @Override public void uncaughtException(      Thread t,      Throwable e){
        if (e instanceof OutOfMemoryError) {
          serverInfoManager.setOutOfMemory();
          LOGGER.error("String_Node_Str",e);
        }
 else         if (e instanceof Error) {
          serverInfoManager.setErrorMessage(e.getMessage());
          LOGGER.error("String_Node_Str",e);
        }
 else {
          LOGGER.error("String_Node_Str",e);
        }
      }
    }
;
    Thread.setDefaultUncaughtExceptionHandler(uncaughtExceptionHandler);
    LOGGER=LoggerFactory.getLogger(BimServer.class);
    LOGGER.info("String_Node_Str");
    if (config.getHomeDir() != null) {
      LOGGER.info("String_Node_Str" + config.getHomeDir().getAbsolutePath() + "String_Node_Str");
    }
 else {
      LOGGER.info("String_Node_Str");
    }
    servicesMap=InterfaceList.createSServicesMap();
    LOGGER.debug("String_Node_Str");
    jsonSocketReflectorFactory=new JsonSocketReflectorFactory(servicesMap);
    LOGGER.debug("String_Node_Str");
    serverInfoManager=new ServerInfoManager();
    LOGGER.debug("String_Node_Str");
    notificationsManager=new NotificationsManager(this,jsonSocketReflectorFactory);
    LOGGER.debug("String_Node_Str");
    internalServicesManager=new InternalServicesManager(this,notificationsManager.getSiteAddress());
    LOGGER.debug("String_Node_Str");
    serviceFactory=new PublicInterfaceFactory(this);
    LOGGER.debug("String_Node_Str");
    pluginManager=new PluginManager(new File(config.getHomeDir(),"String_Node_Str"),config.getClassPath(),serviceFactory,internalServicesManager,servicesMap);
    LOGGER.debug("String_Node_Str");
    versionChecker=new VersionChecker(config.getResourceFetcher());
    LOGGER.debug("String_Node_Str");
    compareCache=new CompareCache();
    LOGGER.debug("String_Node_Str");
    if (config.isStartEmbeddedWebServer()) {
      embeddedWebServer=new EmbeddedWebServer(this,config.isLocalDev());
      LOGGER.debug("String_Node_Str");
    }
    LOGGER.debug("String_Node_Str");
  }
 catch (  Throwable e) {
    if (LOGGER == null) {
      e.printStackTrace();
    }
 else {
      LOGGER.error("String_Node_Str",e);
    }
    serverInfoManager.setErrorMessage(e.getMessage());
  }
}