Program: 28072
Project: 28072
Buggy source:
/** 
 * Configures this accesslog valve with the accesslog related attributes of the domain.xml's <http-service> and <access-log> elements.
 */
void updateAccessLogAttributes(HttpService httpService,WebContainerFeatureFactory fac){
  setResolveHosts(false);
  AccessLog accessLogConfig=httpService.getAccessLog();
  String format=null;
  if (accessLogConfig != null) {
    format=accessLogConfig.getFormat();
  }
 else {
    format=ConfigBeansUtilities.getDefaultFormat();
  }
  setPattern(format);
  int interval=0;
  if (accessLogConfig != null) {
    String s=accessLogConfig.getWriteIntervalSeconds();
    interval=Integer.parseInt(s);
    setWriterInterval(interval);
  }
  if (accessLogConfig != null) {
    setRotatable(Boolean.valueOf(accessLogConfig.getRotationEnabled()));
  }
 else {
    setRotatable(Boolean.valueOf(ConfigBeansUtilities.getDefaultRotationEnabled()));
  }
  interval=0;
  if (accessLogConfig != null) {
    String s=accessLogConfig.getRotationIntervalInMinutes();
    interval=Integer.parseInt(s) * 60;
  }
 else {
    interval=Integer.parseInt(ConfigBeansUtilities.getDefaultRotationIntervalInMinutes()) * 60;
  }
  setRotationInterval(interval);
  String rotationDateStamp=null;
  if (accessLogConfig != null) {
    rotationDateStamp=accessLogConfig.getRotationSuffix();
  }
 else {
    rotationDateStamp=fac.getDefaultAccessLogDateStampPattern();
  }
  if ("String_Node_Str".equals(rotationDateStamp)) {
    rotationDateStamp="String_Node_Str";
  }
  setFileDateFormat(rotationDateStamp);
  setSuffix(fac.getDefaultAccessLogSuffix());
  setAddDateStampToFirstAccessLogFile(fac.getAddDateStampToFirstAccessLogFile());
  deleteAllHistoryFiles=false;
  historyFiles=null;
  maxHistoryFiles=10;
  String prop=System.getProperty(LOGGING_MAX_HISTORY_FILES);
  if (prop != null) {
    if (!"String_Node_Str".equals(prop)) {
      try {
        maxHistoryFiles=Integer.parseInt(prop);
      }
 catch (      NumberFormatException e) {
        String msg=MessageFormat.format(_resourceBundle.getString(LogFacade.INVALID_MAX_HISTORY_FILES),prop);
        _logger.log(Level.WARNING,msg,e);
      }
    }
  }
 else {
    try {
      maxHistoryFiles=Integer.parseInt(accessLogConfig.getMaxHistoryFiles());
    }
 catch (    NumberFormatException e) {
      String msg=MessageFormat.format(_resourceBundle.getString(LogFacade.INVALID_MAX_HISTORY_FILES),accessLogConfig.getMaxHistoryFiles());
      _logger.log(Level.WARNING,msg,e);
    }
  }
  if (maxHistoryFiles == 0) {
    deleteAllHistoryFiles=true;
  }
 else   if (maxHistoryFiles > 0) {
    historyFiles=new LinkedList<File>();
  }
  if (accessLogConfig != null) {
    setCondition(accessLogConfig.getCondition());
  }
 else {
    setCondition(ConfigBeansUtilities.getDefaultCondition());
  }
  accessLogToConsole=Boolean.parseBoolean(accessLogConfig.getLogToConsoleEnabled());
  if (accessLogConfig != null) {
    maximumLogFileSize=Integer.parseInt(accessLogConfig.getMaximumFileSize());
  }
 else {
    maximumLogFileSize=DEFAULT_FILE_SIZE_ROTATION_LIMIT;
  }
}

Fixed version (ground truth):
/** 
 * Configures this accesslog valve with the accesslog related attributes of the domain.xml's <http-service> and <access-log> elements.
 */
void updateAccessLogAttributes(HttpService httpService,WebContainerFeatureFactory fac){
  setResolveHosts(false);
  AccessLog accessLogConfig=httpService.getAccessLog();
  String format=null;
  if (accessLogConfig != null) {
    format=accessLogConfig.getFormat();
  }
 else {
    format=ConfigBeansUtilities.getDefaultFormat();
  }
  setPattern(format);
  int interval=0;
  if (accessLogConfig != null) {
    String s=accessLogConfig.getWriteIntervalSeconds();
    interval=Integer.parseInt(s);
    setWriterInterval(interval);
  }
  if (accessLogConfig != null) {
    setRotatable(Boolean.valueOf(accessLogConfig.getRotationEnabled()));
  }
 else {
    setRotatable(Boolean.valueOf(ConfigBeansUtilities.getDefaultRotationEnabled()));
  }
  interval=0;
  if (accessLogConfig != null) {
    String s=accessLogConfig.getRotationIntervalInMinutes();
    interval=Integer.parseInt(s) * 60;
  }
 else {
    interval=Integer.parseInt(ConfigBeansUtilities.getDefaultRotationIntervalInMinutes()) * 60;
  }
  setRotationInterval(interval);
  String rotationDateStamp=null;
  if (accessLogConfig != null) {
    rotationDateStamp=accessLogConfig.getRotationSuffix();
  }
 else {
    rotationDateStamp=fac.getDefaultAccessLogDateStampPattern();
  }
  if ("String_Node_Str".equals(rotationDateStamp)) {
    rotationDateStamp="String_Node_Str";
  }
  setFileDateFormat(rotationDateStamp);
  setSuffix(fac.getDefaultAccessLogSuffix());
  setAddDateStampToFirstAccessLogFile(fac.getAddDateStampToFirstAccessLogFile());
  deleteAllHistoryFiles=false;
  historyFiles=null;
  maxHistoryFiles=10;
  String prop=System.getProperty(LOGGING_MAX_HISTORY_FILES);
  if (prop != null) {
    if (!"String_Node_Str".equals(prop)) {
      try {
        maxHistoryFiles=Integer.parseInt(prop);
      }
 catch (      NumberFormatException e) {
        String msg=MessageFormat.format(_resourceBundle.getString(LogFacade.INVALID_MAX_HISTORY_FILES),prop);
        _logger.log(Level.WARNING,msg,e);
      }
    }
  }
 else {
    try {
      maxHistoryFiles=Integer.parseInt(accessLogConfig.getMaxHistoryFiles());
    }
 catch (    NumberFormatException e) {
      String msg=MessageFormat.format(_resourceBundle.getString(LogFacade.INVALID_MAX_HISTORY_FILES),accessLogConfig.getMaxHistoryFiles());
      _logger.log(Level.WARNING,msg,e);
    }
  }
  if (maxHistoryFiles == 0) {
    deleteAllHistoryFiles=true;
  }
 else   if (maxHistoryFiles > 0) {
    historyFiles=new LinkedList<File>();
  }
  if (accessLogConfig != null) {
    setCondition(accessLogConfig.getCondition());
    maximumLogFileSize=Integer.parseInt(accessLogConfig.getMaximumFileSize());
  }
 else {
    setCondition(ConfigBeansUtilities.getDefaultCondition());
    maximumLogFileSize=DEFAULT_FILE_SIZE_ROTATION_LIMIT;
  }
  accessLogToConsole=Boolean.parseBoolean(accessLogConfig.getLogToConsoleEnabled());
}