Program: 28135
Project: 28135
Buggy source:
/** 
 * Create the InitialContext object.
 */
@Override @SuppressWarnings("String_Node_Str") public Context getInitialContext(Hashtable env) throws NamingException {
  final Hashtable myEnv=env == null ? new Hashtable() : env;
  if (logger.isLoggable(Level.FINE)) {
    logger.log(Level.FINE,"String_Node_Str",env);
  }
  boolean useLB=propertyIsSet(myEnv,IIOP_ENDPOINTS_PROPERTY) || propertyIsSet(myEnv,LOAD_BALANCING_PROPERTY);
  NamingClusterInfo namingClusterInfo=null;
  if (useLB) {
    if (!initialized) {
synchronized (SerialInitContextFactory.class) {
        if (!initialized) {
          namingClusterInfo=services.getService(NamingClusterInfo.class);
          namingClusterInfo.initGroupInfoService(myEnv,defaultHost,defaultPort,getORB(),services);
          initialized=true;
        }
      }
    }
    if (!myEnv.containsKey(IIOP_URL_PROPERTY)) {
      Context ctx=SerialContext.getStickyContext();
      if (ctx != null) {
        return ctx;
      }
      if (namingClusterInfo == null) {
        namingClusterInfo=services.getService(NamingClusterInfo.class);
      }
      List<String> rrList=namingClusterInfo.getNextRotation();
      if (logger.isLoggable(Level.FINE)) {
        logger.log(Level.FINE,"String_Node_Str",rrList);
      }
      myEnv.put(IIOP_URL_PROPERTY,getCorbalocURL(rrList));
    }
    myEnv.put(ORBLocator.JNDI_CORBA_ORB_PROPERTY,getORB());
  }
 else {
    if (defaultHost != null) {
      myEnv.put(ORBLocator.OMG_ORB_INIT_HOST_PROPERTY,defaultHost);
    }
    if (defaultPort != null) {
      myEnv.put(ORBLocator.OMG_ORB_INIT_PORT_PROPERTY,defaultPort);
    }
  }
  return createInitialContext(myEnv);
}

Fixed version (ground truth):
/** 
 * Create the InitialContext object.
 */
@Override @SuppressWarnings("String_Node_Str") public Context getInitialContext(Hashtable env) throws NamingException {
  final Hashtable myEnv=env == null ? new Hashtable() : env;
  if (logger.isLoggable(Level.FINE)) {
    logger.log(Level.FINE,"String_Node_Str",env);
  }
  boolean useLB=propertyIsSet(myEnv,IIOP_ENDPOINTS_PROPERTY) || propertyIsSet(myEnv,LOAD_BALANCING_PROPERTY);
  NamingClusterInfo namingClusterInfo=null;
  if (useLB) {
    if (!initialized) {
synchronized (SerialInitContextFactory.class) {
        if (!initialized) {
          namingClusterInfo=services.getService(NamingClusterInfo.class);
          namingClusterInfo.initGroupInfoService(myEnv,defaultHost,defaultPort,getORB(),services);
          initialized=true;
        }
      }
    }
    if (!myEnv.containsKey(IIOP_URL_PROPERTY)) {
      Context ctx=SerialContext.getStickyContext();
      if (ctx != null) {
        return ctx;
      }
      if (namingClusterInfo == null) {
        namingClusterInfo=services.getService(NamingClusterInfo.class);
        namingClusterInfo.setClusterInstanceInfo(myEnv,defaultHost,defaultPort,false);
      }
      List<String> rrList=namingClusterInfo.getNextRotation();
      if (logger.isLoggable(Level.FINE)) {
        logger.log(Level.FINE,"String_Node_Str",rrList);
      }
      myEnv.put(IIOP_URL_PROPERTY,getCorbalocURL(rrList));
    }
    myEnv.put(ORBLocator.JNDI_CORBA_ORB_PROPERTY,getORB());
  }
 else {
    if (defaultHost != null) {
      myEnv.put(ORBLocator.OMG_ORB_INIT_HOST_PROPERTY,defaultHost);
    }
    if (defaultPort != null) {
      myEnv.put(ORBLocator.OMG_ORB_INIT_PORT_PROPERTY,defaultPort);
    }
  }
  return createInitialContext(myEnv);
}