Program: 28717
Project: 28717
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;
  boolean membershipChangeForced=false;
  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 && !initialized) {
synchronized (SerialInitContextFactory.class) {
      if (!initialized) {
        namingClusterInfo=services.getService(NamingClusterInfo.class);
        namingClusterInfo.initGroupInfoService(myEnv,defaultHost,defaultPort,getORB(),services);
        membershipChangeForced=true;
        initialized=true;
      }
    }
  }
  if (useLB || initialized) {
    if (!myEnv.containsKey(IIOP_URL_PROPERTY)) {
      Context ctx=SerialContext.getStickyContext();
      if (ctx != null) {
        return ctx;
      }
      if (namingClusterInfo == null) {
        namingClusterInfo=services.getService(NamingClusterInfo.class);
      }
      if (myEnv.containsKey(IIOP_ENDPOINTS_PROPERTY) || myEnv.containsKey(LOAD_BALANCING_PROPERTY)) {
synchronized (SerialInitContextFactory.class) {
          namingClusterInfo.setClusterInstanceInfo(myEnv,defaultHost,defaultPort,membershipChangeForced);
        }
      }
      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);
      }
      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);
}