Program: 94153
Project: 94153
Buggy source:
/** 
 * @since 3.0
 */
protected GenericContainerArgs getServerArgs(Object[] args) throws IDCreateException {
  ID newID=null;
  Integer ka=null;
  InetAddress bindAddress=null;
  if (args != null && args.length > 0) {
    if (args[0] instanceof Map) {
      Map map=(Map)args[0];
      Object idVal=map.get(ID_PROP);
      if (idVal != null) {
        newID=getIDFromArg(idVal);
      }
 else {
        String hostname=SSLServerSOContainer.DEFAULT_HOST;
        Object hostVal=map.get(HOSTNAME_PROP);
        if (hostVal != null) {
          if (!(hostVal instanceof String))           throw new IllegalArgumentException("String_Node_Str");
          hostname=(String)hostVal;
        }
        int port=-1;
        Object portVal=map.get(PORT_PROP);
        if (portVal != null)         port=getIntegerFromArg(portVal).intValue();
        if (port < 0)         port=getSSLServerPort(port);
        String path=SSLServerSOContainer.DEFAULT_NAME;
        Object pathVal=map.get(PATH_PROP);
        if (pathVal != null) {
          if (!(pathVal instanceof String))           throw new IllegalArgumentException("String_Node_Str");
          path=(String)pathVal;
        }
        newID=createSSLServerID(hostname,port,path);
      }
      Object bindAddressVal=map.get(BINDADDRESS_PROP);
      if (bindAddressVal != null) {
        if (bindAddressVal instanceof InetAddress) {
          bindAddress=(InetAddress)bindAddressVal;
        }
 else         throw new IllegalArgumentException("String_Node_Str");
      }
      Object o=map.get(KEEPALIVE_PROP);
      if (o == null)       o=map.get(KEEPALIVE_PROP.toLowerCase());
      ka=getIntegerFromArg(o);
    }
 else     if (args.length > 1) {
      if (args[0] instanceof String || args[0] instanceof ID)       newID=getIDFromArg(args[0]);
      if (args[1] instanceof String || args[1] instanceof Integer)       ka=getIntegerFromArg(args[1]);
    }
 else     newID=getIDFromArg(args[0]);
  }
  if (newID == null) {
    int port=-1;
    if (SSLServerSOContainer.DEFAULT_FALLBACK_PORT) {
      port=getFreePort();
    }
 else     if (portIsFree(SSLServerSOContainer.DEFAULT_PORT)) {
      port=SSLServerSOContainer.DEFAULT_PORT;
    }
    if (port < 0)     throw new IDCreateException("String_Node_Str" + SSLServerSOContainer.DEFAULT_FALLBACK_PORT + "String_Node_Str"+ SSLServerSOContainer.DEFAULT_PORT);
    newID=IDFactory.getDefault().createStringID(SSLServerSOContainer.DEFAULT_PROTOCOL + "String_Node_Str" + SSLServerSOContainer.DEFAULT_HOST+ "String_Node_Str"+ port+ SSLServerSOContainer.DEFAULT_NAME);
  }
  if (ka == null)   ka=new Integer(SSLServerSOContainer.DEFAULT_KEEPALIVE);
  return new GenericContainerArgs(newID,ka,bindAddress);
}

Fixed version (ground truth):
/** 
 * @since 3.0
 */
protected GenericContainerArgs getServerArgs(Object[] args) throws IDCreateException {
  ID newID=null;
  Integer ka=null;
  InetAddress bindAddress=null;
  boolean wantClientAuth=false;
  boolean needClientAuth=false;
  if (args != null && args.length > 0) {
    if (args[0] instanceof Map) {
      Map map=(Map)args[0];
      Object idVal=map.get(ID_PROP);
      if (idVal != null) {
        newID=getIDFromArg(idVal);
      }
 else {
        String hostname=SSLServerSOContainer.DEFAULT_HOST;
        Object hostVal=map.get(HOSTNAME_PROP);
        if (hostVal != null) {
          if (!(hostVal instanceof String))           throw new IllegalArgumentException("String_Node_Str");
          hostname=(String)hostVal;
        }
        int port=-1;
        Object portVal=map.get(PORT_PROP);
        if (portVal != null)         port=getIntegerFromArg(portVal).intValue();
        if (port < 0)         port=getSSLServerPort(port);
        String path=SSLServerSOContainer.DEFAULT_NAME;
        Object pathVal=map.get(PATH_PROP);
        if (pathVal != null) {
          if (!(pathVal instanceof String))           throw new IllegalArgumentException("String_Node_Str");
          path=(String)pathVal;
        }
        newID=createSSLServerID(hostname,port,path);
      }
      Object bindAddressVal=map.get(BINDADDRESS_PROP);
      if (bindAddressVal != null) {
        if (bindAddressVal instanceof InetAddress) {
          bindAddress=(InetAddress)bindAddressVal;
        }
 else         throw new IllegalArgumentException("String_Node_Str");
      }
      Object o=map.get(KEEPALIVE_PROP);
      if (o == null)       o=map.get(KEEPALIVE_PROP.toLowerCase());
      ka=getIntegerFromArg(o);
      Object needClientAuthVal=map.get(NEEDCLIENTAUTH_PROP);
      if (needClientAuthVal instanceof Boolean)       needClientAuth=((Boolean)needClientAuthVal).booleanValue();
      Object wantClientAuthVal=map.get(WANTCLIENTAUTH_PROP);
      if (wantClientAuthVal instanceof Boolean)       wantClientAuth=((Boolean)wantClientAuthVal).booleanValue();
    }
 else     if (args.length > 1) {
      if (args[0] instanceof String || args[0] instanceof ID)       newID=getIDFromArg(args[0]);
      if (args[1] instanceof String || args[1] instanceof Integer)       ka=getIntegerFromArg(args[1]);
    }
 else     newID=getIDFromArg(args[0]);
  }
  if (newID == null) {
    int port=-1;
    if (SSLServerSOContainer.DEFAULT_FALLBACK_PORT) {
      port=getFreePort();
    }
 else     if (portIsFree(SSLServerSOContainer.DEFAULT_PORT)) {
      port=SSLServerSOContainer.DEFAULT_PORT;
    }
    if (port < 0)     throw new IDCreateException("String_Node_Str" + SSLServerSOContainer.DEFAULT_FALLBACK_PORT + "String_Node_Str"+ SSLServerSOContainer.DEFAULT_PORT);
    newID=IDFactory.getDefault().createStringID(SSLServerSOContainer.DEFAULT_PROTOCOL + "String_Node_Str" + SSLServerSOContainer.DEFAULT_HOST+ "String_Node_Str"+ port+ SSLServerSOContainer.DEFAULT_NAME);
  }
  if (ka == null)   ka=new Integer(SSLServerSOContainer.DEFAULT_KEEPALIVE);
  return new GenericContainerArgs(newID,ka,bindAddress,wantClientAuth,needClientAuth);
}