Program: 31372
Project: 31372
Buggy source:
/** 
 * This function is invoked at application startup and when the configuration file polling period has elapsed and a change in the configuration file has been detected. It's main purpose is to read the configuration file and establish the configuration object model for use at runtime during the <code>doFilter()</code> method. 
 */
public void init(FilterConfig fc) throws ServletException {
  this.fc=fc;
  logger.debug("String_Node_Str");
  logSettingsFilename=fc.getInitParameter(LOGGING_FILE_PARAM);
  String realLogSettingsFilename=fc.getServletContext().getRealPath(logSettingsFilename);
  if (realLogSettingsFilename == null || (!new File(realLogSettingsFilename).exists())) {
    throw new ServletException("String_Node_Str" + realLogSettingsFilename);
  }
  configurationFilename=fc.getInitParameter(CONFIGURATION_FILE_PARAM);
  String realConfigFilename=fc.getServletContext().getRealPath(configurationFilename);
  if (realConfigFilename == null || !new File(realConfigFilename).exists()) {
    throw new ServletException("String_Node_Str" + realConfigFilename);
  }
  String sPollingTime=fc.getInitParameter(POLLING_TIME_PARAM);
  if (sPollingTime != null) {
    pollingTime=Long.parseLong(sPollingTime);
  }
 else {
    pollingTime=DEFAULT_POLLING_TIME;
  }
  try {
    String webRootDir=fc.getServletContext().getRealPath("String_Node_Str");
    appGuardConfig=ConfigurationParser.readConfigurationFile(new FileInputStream(realConfigFilename),webRootDir);
    DOMConfigurator.configure(realLogSettingsFilename);
    lastConfigReadTime=System.currentTimeMillis();
  }
 catch (  FileNotFoundException e) {
    throw new ServletException(e);
  }
catch (  ConfigurationException e) {
    throw new ServletException(e);
  }
}

Fixed version (ground truth):
/** 
 * This function is invoked at application startup and when the configuration file polling period has elapsed and a change in the configuration file has been detected. It's main purpose is to read the configuration file and establish the configuration object model for use at runtime during the <code>doFilter()</code> method. 
 */
public void init(FilterConfig fc) throws ServletException {
  this.fc=fc;
  logger.debug("String_Node_Str");
  logSettingsFilename=fc.getInitParameter(LOGGING_FILE_PARAM);
  String realLogSettingsFilename=fc.getServletContext().getRealPath(logSettingsFilename);
  if (realLogSettingsFilename == null || (!new File(realLogSettingsFilename).exists())) {
    throw new ServletException("String_Node_Str" + realLogSettingsFilename);
  }
  configurationFilename=fc.getInitParameter(CONFIGURATION_FILE_PARAM);
  configurationFilename=fc.getServletContext().getRealPath(configurationFilename);
  if (configurationFilename == null || !new File(configurationFilename).exists()) {
    throw new ServletException("String_Node_Str" + configurationFilename);
  }
  String sPollingTime=fc.getInitParameter(POLLING_TIME_PARAM);
  if (sPollingTime != null) {
    pollingTime=Long.parseLong(sPollingTime);
  }
 else {
    pollingTime=DEFAULT_POLLING_TIME;
  }
  try {
    String webRootDir=fc.getServletContext().getRealPath("String_Node_Str");
    appGuardConfig=ConfigurationParser.readConfigurationFile(new FileInputStream(configurationFilename),webRootDir);
    DOMConfigurator.configure(realLogSettingsFilename);
    lastConfigReadTime=System.currentTimeMillis();
  }
 catch (  FileNotFoundException e) {
    throw new ServletException(e);
  }
catch (  ConfigurationException e) {
    throw new ServletException(e);
  }
}