Program: 28095
Project: 28095
Buggy source:
@Override public void postConstruct(){
  String filename=evaluateFileName();
  File logFile=new File(filename);
  absoluteServerLogName=filename;
  if (!logFile.isAbsolute()) {
    logFile=new File(env.getDomainRoot(),filename);
    absoluteServerLogName=env.getDomainRoot() + File.separator + filename;
  }
  changeFileName(logFile);
  BufferedReader br=null;
  String strLine="String_Node_Str";
  int odlFormatter=0;
  int uniformLogFormatter=0;
  int otherFormatter=0;
  boolean mustRotate=false;
  String propertyValue=null;
  propertyValue=manager.getProperty(className + "String_Node_Str");
  logToFile=false;
  if (propertyValue != null) {
    logToFile=Boolean.parseBoolean(propertyValue);
  }
  try {
    br=new BufferedReader(new FileReader(logFile));
    while ((strLine=br.readLine()) != null) {
      strLine=strLine.trim();
      if (!strLine.equals("String_Node_Str")) {
        if (LogFormatHelper.isUniformFormatLogHeader(strLine)) {
          uniformLogFormatter++;
        }
 else         if (LogFormatHelper.isODLFormatLogHeader(strLine)) {
          odlFormatter++;
        }
 else {
          otherFormatter++;
        }
        if (otherFormatter > 0) {
          mustRotate=true;
        }
        break;
      }
    }
  }
 catch (  Exception e) {
    ErrorManager em=getErrorManager();
    if (em != null) {
      em.error(e.getMessage(),e,ErrorManager.GENERIC_FAILURE);
    }
  }
 finally {
    if (br != null) {
      try {
        br.close();
      }
 catch (      Exception e) {
      }
    }
  }
  if (odlFormatter > 0) {
    currentgffileHandlerFormatter="String_Node_Str";
  }
 else   if (uniformLogFormatter > 0) {
    currentgffileHandlerFormatter="String_Node_Str";
  }
  initializePump();
  logRecord.setParameters(new Object[]{Version.getFullVersion()});
  logRecord.setResourceBundle(ResourceBundle.getBundle(LogFacade.LOGGING_RB_NAME));
  logRecord.setThreadID((int)Thread.currentThread().getId());
  logRecord.setLoggerName(LogFacade.LOGGING_LOGGER_NAME);
  EarlyLogHandler.earlyMessages.add(logRecord);
  propertyValue=manager.getProperty(className + "String_Node_Str");
  timeBasedRotation(propertyValue);
  propertyValue=manager.getProperty(className + "String_Node_Str");
  rotationOnFileSizeLimit(propertyValue);
  propertyValue=manager.getProperty(className + "String_Node_Str");
  if (propertyValue != null) {
    try {
      flushFrequency=Integer.parseInt(propertyValue);
    }
 catch (    NumberFormatException e) {
      logRecord=new LogRecord(Level.WARNING,LogFacade.INVALID_ATTRIBUTE_VALUE);
      logRecord.setParameters(new Object[]{propertyValue,"String_Node_Str"});
      logRecord.setResourceBundle(ResourceBundle.getBundle(LogFacade.LOGGING_RB_NAME));
      logRecord.setThreadID((int)Thread.currentThread().getId());
      logRecord.setLoggerName(LogFacade.LOGGING_LOGGER_NAME);
      EarlyLogHandler.earlyMessages.add(logRecord);
    }
  }
  if (flushFrequency <= 0) {
    flushFrequency=1;
  }
  propertyValue=manager.getProperty(className + "String_Node_Str");
  try {
    if (propertyValue != null) {
      maxHistoryFiles=Integer.parseInt(propertyValue);
    }
  }
 catch (  NumberFormatException e) {
    logRecord=new LogRecord(Level.WARNING,LogFacade.INVALID_ATTRIBUTE_VALUE);
    logRecord.setParameters(new Object[]{propertyValue,"String_Node_Str"});
    logRecord.setResourceBundle(ResourceBundle.getBundle(LogFacade.LOGGING_RB_NAME));
    logRecord.setThreadID((int)Thread.currentThread().getId());
    logRecord.setLoggerName(LogFacade.LOGGING_LOGGER_NAME);
    EarlyLogHandler.earlyMessages.add(logRecord);
  }
  if (maxHistoryFiles < 0) {
    maxHistoryFiles=10;
  }
  propertyValue=manager.getProperty(className + "String_Node_Str");
  compressionOnRotation=false;
  if (propertyValue != null) {
    compressionOnRotation=Boolean.parseBoolean(propertyValue);
  }
  String formatterName=manager.getProperty(className + "String_Node_Str");
  formatterName=(formatterName == null) ? DEFAULT_LOG_FILE_FORMATTER_CLASS_NAME : formatterName;
  gffileHandlerFormatter=formatterName;
  if (mustRotate) {
    rotate();
  }
 else   if (gffileHandlerFormatter != null && !gffileHandlerFormatter.equals(currentgffileHandlerFormatter)) {
    rotate();
  }
  excludeFields=manager.getProperty(LogManagerService.EXCLUDE_FIELDS_PROPERTY);
  multiLineMode=Boolean.parseBoolean(manager.getProperty(LogManagerService.MULTI_LINE_MODE_PROPERTY));
  configureLogFormatter(formatterName,excludeFields,multiLineMode);
}

Fixed version (ground truth):
@Override public void postConstruct(){
  String filename=evaluateFileName();
  File logFile=new File(filename);
  absoluteServerLogName=filename;
  if (!logFile.isAbsolute()) {
    logFile=new File(env.getDomainRoot(),filename);
    absoluteServerLogName=env.getDomainRoot() + File.separator + filename;
  }
  changeFileName(logFile);
  BufferedReader br=null;
  String strLine="String_Node_Str";
  int odlFormatter=0;
  int uniformLogFormatter=0;
  int otherFormatter=0;
  boolean mustRotate=false;
  String propertyValue=null;
  propertyValue=manager.getProperty(className + "String_Node_Str");
  logToFile=true;
  if (propertyValue != null) {
    logToFile=Boolean.parseBoolean(propertyValue);
  }
  try {
    br=new BufferedReader(new FileReader(logFile));
    while ((strLine=br.readLine()) != null) {
      strLine=strLine.trim();
      if (!strLine.equals("String_Node_Str")) {
        if (LogFormatHelper.isUniformFormatLogHeader(strLine)) {
          uniformLogFormatter++;
        }
 else         if (LogFormatHelper.isODLFormatLogHeader(strLine)) {
          odlFormatter++;
        }
 else {
          otherFormatter++;
        }
        if (otherFormatter > 0) {
          mustRotate=true;
        }
        break;
      }
    }
  }
 catch (  Exception e) {
    ErrorManager em=getErrorManager();
    if (em != null) {
      em.error(e.getMessage(),e,ErrorManager.GENERIC_FAILURE);
    }
  }
 finally {
    if (br != null) {
      try {
        br.close();
      }
 catch (      Exception e) {
      }
    }
  }
  if (odlFormatter > 0) {
    currentgffileHandlerFormatter="String_Node_Str";
  }
 else   if (uniformLogFormatter > 0) {
    currentgffileHandlerFormatter="String_Node_Str";
  }
  initializePump();
  logRecord.setParameters(new Object[]{Version.getFullVersion()});
  logRecord.setResourceBundle(ResourceBundle.getBundle(LogFacade.LOGGING_RB_NAME));
  logRecord.setThreadID((int)Thread.currentThread().getId());
  logRecord.setLoggerName(LogFacade.LOGGING_LOGGER_NAME);
  EarlyLogHandler.earlyMessages.add(logRecord);
  propertyValue=manager.getProperty(className + "String_Node_Str");
  timeBasedRotation(propertyValue);
  propertyValue=manager.getProperty(className + "String_Node_Str");
  rotationOnFileSizeLimit(propertyValue);
  propertyValue=manager.getProperty(className + "String_Node_Str");
  if (propertyValue != null) {
    try {
      flushFrequency=Integer.parseInt(propertyValue);
    }
 catch (    NumberFormatException e) {
      logRecord=new LogRecord(Level.WARNING,LogFacade.INVALID_ATTRIBUTE_VALUE);
      logRecord.setParameters(new Object[]{propertyValue,"String_Node_Str"});
      logRecord.setResourceBundle(ResourceBundle.getBundle(LogFacade.LOGGING_RB_NAME));
      logRecord.setThreadID((int)Thread.currentThread().getId());
      logRecord.setLoggerName(LogFacade.LOGGING_LOGGER_NAME);
      EarlyLogHandler.earlyMessages.add(logRecord);
    }
  }
  if (flushFrequency <= 0) {
    flushFrequency=1;
  }
  propertyValue=manager.getProperty(className + "String_Node_Str");
  try {
    if (propertyValue != null) {
      maxHistoryFiles=Integer.parseInt(propertyValue);
    }
  }
 catch (  NumberFormatException e) {
    logRecord=new LogRecord(Level.WARNING,LogFacade.INVALID_ATTRIBUTE_VALUE);
    logRecord.setParameters(new Object[]{propertyValue,"String_Node_Str"});
    logRecord.setResourceBundle(ResourceBundle.getBundle(LogFacade.LOGGING_RB_NAME));
    logRecord.setThreadID((int)Thread.currentThread().getId());
    logRecord.setLoggerName(LogFacade.LOGGING_LOGGER_NAME);
    EarlyLogHandler.earlyMessages.add(logRecord);
  }
  if (maxHistoryFiles < 0) {
    maxHistoryFiles=10;
  }
  propertyValue=manager.getProperty(className + "String_Node_Str");
  compressionOnRotation=false;
  if (propertyValue != null) {
    compressionOnRotation=Boolean.parseBoolean(propertyValue);
  }
  String formatterName=manager.getProperty(className + "String_Node_Str");
  formatterName=(formatterName == null) ? DEFAULT_LOG_FILE_FORMATTER_CLASS_NAME : formatterName;
  gffileHandlerFormatter=formatterName;
  if (mustRotate) {
    rotate();
  }
 else   if (gffileHandlerFormatter != null && !gffileHandlerFormatter.equals(currentgffileHandlerFormatter)) {
    rotate();
  }
  excludeFields=manager.getProperty(LogManagerService.EXCLUDE_FIELDS_PROPERTY);
  multiLineMode=Boolean.parseBoolean(manager.getProperty(LogManagerService.MULTI_LINE_MODE_PROPERTY));
  configureLogFormatter(formatterName,excludeFields,multiLineMode);
}