Program: 29120
Project: 29120
Buggy source:
public void readInstanceLevelParams(ServerConfigLookup serverConfigLookup){
  org.glassfish.web.config.serverbeans.SessionManager smBean=serverConfigLookup.getInstanceSessionManager();
  if (smBean != null) {
    org.glassfish.web.config.serverbeans.ManagerProperties mgrBean=smBean.getManagerProperties();
    if (mgrBean != null) {
      String reapIntervalInSecondsString=mgrBean.getReapIntervalInSeconds();
      if (reapIntervalInSecondsString != null) {
        try {
          reapInterval=Integer.parseInt(reapIntervalInSecondsString);
          if (_logger.isLoggable(Level.FINEST)) {
            _logger.log(Level.FINEST,MANAGER_REAP_INTERVAL_SET,reapInterval);
          }
        }
 catch (        NumberFormatException e) {
        }
      }
 else {
        if (_logger.isLoggable(Level.FINEST)) {
          _logger.log(Level.FINEST,NO_INSTANCE_LEVEL_VALUE_SET_MGR_REAP_INTERVAL);
        }
      }
      String maxSessionsString=mgrBean.getMaxSessions();
      if (maxSessionsString != null) {
        try {
          maxSessions=Integer.parseInt(maxSessionsString);
          if (_logger.isLoggable(Level.FINEST)) {
            _logger.log(Level.FINEST,MAX_SESSIONS_SET,maxSessions);
          }
        }
 catch (        NumberFormatException e) {
        }
      }
 else {
        if (_logger.isLoggable(Level.FINEST)) {
          _logger.log(Level.FINEST,NO_INSTANCE_LEVEL_VALUE_SET_MAX_SESSIONS);
        }
      }
      String sessionFilenameString=mgrBean.getSessionFileName();
      if (sessionFilenameString != null) {
        sessionFilename=sessionFilenameString;
        if (_logger.isLoggable(Level.FINEST)) {
          _logger.log(Level.FINEST,SESSION_FILENAME_SET,sessionFilename);
        }
      }
      sessionIdGeneratorClassname=mgrBean.getSessionIdGeneratorClassname();
      if (sessionIdGeneratorClassname != null && _logger.isLoggable(Level.FINEST)) {
        _logger.log(Level.FINEST,SESSION_ID_GENERATOR_CLASSNAME_SET,sessionIdGeneratorClassname);
      }
      List<Property> props=mgrBean.getProperty();
      if (props != null) {
        for (        Property prop : props) {
          String name=prop.getName();
          String value=prop.getValue();
          if (name.equalsIgnoreCase("String_Node_Str")) {
            try {
              maxIdleBackup=Integer.parseInt(value);
            }
 catch (            NumberFormatException e) {
            }
          }
        }
      }
    }
    org.glassfish.web.config.serverbeans.StoreProperties storeBean=smBean.getStoreProperties();
    if (storeBean != null) {
      String reapIntervalInSecondsString=storeBean.getReapIntervalInSeconds();
      if (reapIntervalInSecondsString != null) {
        try {
          storeReapInterval=Integer.parseInt(reapIntervalInSecondsString);
          if (_logger.isLoggable(Level.FINEST)) {
            _logger.log(Level.FINEST,STORE_REAP_INTERVAL_SET,storeReapInterval);
          }
        }
 catch (        NumberFormatException e) {
        }
      }
      String directoryString=storeBean.getDirectory();
      if (directoryString != null) {
        directory=directoryString;
        if (_logger.isLoggable(Level.FINEST)) {
          _logger.log(Level.FINEST,DIRECTORY_SET,directoryString);
        }
      }
    }
  }
  SessionProperties spBean=serverConfigLookup.getInstanceSessionProperties();
  if (spBean != null) {
    String timeoutSecondsString=spBean.getTimeoutInSeconds();
    if (timeoutSecondsString != null) {
      try {
        sessionMaxInactiveInterval=Integer.parseInt(timeoutSecondsString);
        if (_logger.isLoggable(Level.FINEST)) {
          _logger.log(Level.FINEST,SESSION_MAX_INACTIVE_INTERVAL_SET,sessionMaxInactiveInterval);
        }
      }
 catch (      NumberFormatException e) {
      }
    }
 else {
      if (_logger.isLoggable(Level.FINEST)) {
        _logger.log(Level.FINEST,NO_INSTANCE_LEVEL_VALUE_SET_SESSION_MAX_INACTIVE_INTERVAL);
      }
    }
  }
}

Fixed version (ground truth):
public void readInstanceLevelParams(ServerConfigLookup serverConfigLookup){
  org.glassfish.web.config.serverbeans.SessionManager smBean=serverConfigLookup.getInstanceSessionManager();
  if (smBean != null) {
    org.glassfish.web.config.serverbeans.ManagerProperties mgrBean=smBean.getManagerProperties();
    if (mgrBean != null) {
      String reapIntervalInSecondsString=mgrBean.getReapIntervalInSeconds();
      if (reapIntervalInSecondsString != null) {
        try {
          reapInterval=Integer.parseInt(reapIntervalInSecondsString);
          if (_logger.isLoggable(Level.FINEST)) {
            _logger.log(Level.FINEST,MANAGER_REAP_INTERVAL_SET,reapInterval);
          }
        }
 catch (        NumberFormatException e) {
        }
      }
 else {
        if (_logger.isLoggable(Level.FINEST)) {
          _logger.log(Level.FINEST,NO_INSTANCE_LEVEL_VALUE_SET_MGR_REAP_INTERVAL);
        }
      }
      String maxSessionsString=mgrBean.getMaxSessions();
      if (maxSessionsString != null) {
        try {
          maxSessions=Integer.parseInt(maxSessionsString);
          if (_logger.isLoggable(Level.FINEST)) {
            _logger.log(Level.FINEST,MAX_SESSIONS_SET,maxSessions);
          }
        }
 catch (        NumberFormatException e) {
        }
      }
 else {
        if (_logger.isLoggable(Level.FINEST)) {
          _logger.log(Level.FINEST,NO_INSTANCE_LEVEL_VALUE_SET_MAX_SESSIONS);
        }
      }
      String sessionFilenameString=mgrBean.getSessionFileName();
      if (sessionFilenameString != null) {
        sessionFilename=sessionFilenameString;
        if (_logger.isLoggable(Level.FINEST)) {
          _logger.log(Level.FINEST,SESSION_FILENAME_SET,sessionFilename);
        }
      }
      sessionIdGeneratorClassname=mgrBean.getSessionIdGeneratorClassname();
      if (sessionIdGeneratorClassname != null && _logger.isLoggable(Level.FINEST)) {
        _logger.log(Level.FINEST,SESSION_ID_GENERATOR_CLASSNAME_SET,sessionIdGeneratorClassname);
      }
      List<Property> props=mgrBean.getProperty();
      if (props != null) {
        for (        Property prop : props) {
          String name=prop.getName();
          String value=prop.getValue();
        }
      }
    }
    org.glassfish.web.config.serverbeans.StoreProperties storeBean=smBean.getStoreProperties();
    if (storeBean != null) {
      String reapIntervalInSecondsString=storeBean.getReapIntervalInSeconds();
      if (reapIntervalInSecondsString != null) {
        try {
          storeReapInterval=Integer.parseInt(reapIntervalInSecondsString);
          if (_logger.isLoggable(Level.FINEST)) {
            _logger.log(Level.FINEST,STORE_REAP_INTERVAL_SET,storeReapInterval);
          }
        }
 catch (        NumberFormatException e) {
        }
      }
      String directoryString=storeBean.getDirectory();
      if (directoryString != null) {
        directory=directoryString;
        if (_logger.isLoggable(Level.FINEST)) {
          _logger.log(Level.FINEST,DIRECTORY_SET,directoryString);
        }
      }
    }
  }
  SessionProperties spBean=serverConfigLookup.getInstanceSessionProperties();
  if (spBean != null) {
    String timeoutSecondsString=spBean.getTimeoutInSeconds();
    if (timeoutSecondsString != null) {
      try {
        sessionMaxInactiveInterval=Integer.parseInt(timeoutSecondsString);
        if (_logger.isLoggable(Level.FINEST)) {
          _logger.log(Level.FINEST,SESSION_MAX_INACTIVE_INTERVAL_SET,sessionMaxInactiveInterval);
        }
      }
 catch (      NumberFormatException e) {
      }
    }
 else {
      if (_logger.isLoggable(Level.FINEST)) {
        _logger.log(Level.FINEST,NO_INSTANCE_LEVEL_VALUE_SET_SESSION_MAX_INACTIVE_INTERVAL);
      }
    }
  }
}