/*
default bus name is "DEFAULT", null bus name is not valid.
422712
@Override
    public String getBusName() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getBusName");
        String busName = jcaConnectionFactory.getBusName();
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getBusName", busName);
        return busName;
    }
404884
@Nonnull
  public static EChange setUseSTARTTLS (final boolean bUseSTARTTLS)
  {
    return s_aRWLock.writeLocked ( () -> {
      if (s_bUseSTARTTLS == bUseSTARTTLS)
        return EChange.UNCHANGED;
      s_bUseSTARTTLS = bUseSTARTTLS;
      return EChange.CHANGED;
    });
  }
247140
function Queue(bus, name) {
  events.EventEmitter.call(this);
  this.setMaxListeners(0);
  this.bus = bus;
  this.type = 'queue';
  this.id = this.bus.options.layout === 'cluster' ? "{bus:queue:" + name + "}" : "bus:queue:" + name;
  this.logger = bus.logger.withTag(this.id);
  this.name = name;
  this._state = STATES.DETACHED;
  this.metadataKey = this.id + ":metadata";
  this.messagesKey = this.id + ":messages";
  this.messageIdKey = this.id + ":msgid";
  this.messagesToAckKey = this.id + ":toack";
  this.messageAvailableChannel = this.id + ":available";
  this.qKeys = [this.metadataKey, this.messagesKey, this.messageIdKey, this.messagesToAckKey];
  this.toucher = null;
  this._pushed = 0;
  this._consumed = 0;
}
881537
static String normalizeDefaultHostname(String defaultHostname) {
        requireNonNull(defaultHostname, "defaultHostname");
        if (needsNormalization(defaultHostname)) {
            defaultHostname = IDN.toASCII(defaultHostname, IDN.ALLOW_UNASSIGNED);
        }

        if (!HOSTNAME_PATTERN.matcher(defaultHostname).matches()) {
            throw new IllegalArgumentException("defaultHostname: " + defaultHostname);
        }

        return Ascii.toLowerCase(defaultHostname);
    }
595532
@Override
	public void setName(String name) {
		if (name == null) {
			super.setName(getFirstFreeBusStopName(getContainer()));
		} else {
			super.setName(name);
		}
	}
698035
private boolean hasNoDefaultValueAndNoValuePassedOnAlternativeName(Option o, Map<String, String> data)
			throws RequiredParametersException {
		if (o.hasAlt() && data.containsKey(o.getAlt())) {
			data.put(o.getName(), data.get(o.getAlt()));
		} else {
			if (o.hasDefaultValue()) {
				data.put(o.getName(), o.getDefaultValue());
				if (o.hasAlt()) {
					data.put(o.getAlt(), o.getDefaultValue());
				}
			} else {
				return true;
			}
		}
		return false;
	}
809176
public boolean okToForward(String busName)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "okToForward", busName);

    boolean returnVal = false;

    if (busName == null)
      returnVal = true;
    else if (!busName.equals(iBusId))
      returnVal = true;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "okToForward", new Boolean(returnVal));

    return returnVal;
  }
1257296
function Service(bus, name) {
  events.EventEmitter.call(this);
  this.bus = bus;
  this.name = name;
  this.logger = bus.logger.withTag(name);
  this.type = "service";
  this.id = "service:" + name;
  this.replyTo = this.id + ":replyTo:" + crypto.randomBytes(8).toString("hex");
  this.pendingReplies = {};
  this.requesters = {};
  this.inflight = 0;
}
271104
@Override
	protected void checkPrimitiveValidity() {
		BusPrimitiveInvalidity invalidityReason = null;
		if (this.itineraries.isEmpty()) {
			invalidityReason = new BusPrimitiveInvalidity(
					BusPrimitiveInvalidityType.NO_ITINERARY_IN_LINE,
					null);
		} else {
			final Iterator<BusItinerary> iterator = this.itineraries.iterator();
			BusItinerary itinerary;
			while (iterator.hasNext() && invalidityReason == null) {
				itinerary = iterator.next();
				if (!itinerary.isValidPrimitive()) {
					invalidityReason = new BusPrimitiveInvalidity(
							BusPrimitiveInvalidityType.INVALID_ITINERARY_IN_LINE,
							itinerary.getName());
				}
			}
		}
		setPrimitiveValidity(invalidityReason);
	}
1000812
static public Bus getBy(String busName){
		if(busName==null)
			return get();
		
		Bus bus = busMap.get(busName);
		if(bus==null) {
			bus=new Bus();
			busMap.put(busName, bus);
		}
		return bus;
	}
983655
@Override
    public void validateDefault(InputProblemReporter rep, boolean normalize)
        throws XMLStreamException
    {
        // First, basic checks that it's a valid non-empty name:
        String def = validateDefaultName(rep, normalize);

        // And then that it's one of listed values:
        String shared = mEnumValues.find(def);
        if (shared == null) {
            reportValidationProblem(rep, "Invalid default value '"+def+"': has to be one of ("
                                    +mEnumValues+")");
        }

        // Ok, cool it's ok...
        if (normalize) {
            mDefValue.setValue(shared);
        }
    }
245526
public boolean destinationExists(String destinationName, String busName) throws SIMPNullParameterException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "destinationExists", new Object[] { destinationName, busName });

        // Check that the destination name is not null.  If it is, throw a
        // SIMPNullParameterException
        if (destinationName == null)
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(
                           tc,
                           "destinationExists",
                           "Destination name null");

            throw new SIMPNullParameterException(
                            nls_cwsik.getFormattedMessage(
                                                          "MISSING_PARAM_ERROR_CWSIP0044",
                                                          new Object[] { messageProcessor.getMessagingEngineName() }, null));

        }

        // Now look for the destination in the hash table
        boolean exists = destinationIndex.containsKey(busName, destinationName);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "destinationExists", new Boolean(exists));

        return exists;

    }
227915
@Pure
	public static String getFirstFreeBusStopName(BusNetwork busNetwork) {
		if (busNetwork == null) {
			return null;
		}
		int nb = busNetwork.getBusStopCount();
		String name;
		do {
			++nb;
			name = Locale.getString("NAME_TEMPLATE", Integer.toString(nb)); //$NON-NLS-1$
		}
		while (busNetwork.getBusStop(name) != null);
		return name;
	}
849542
public final String getBusName() {

        String thisMethodName = "getBusName";

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, thisMethodName, this);
        }

        String retVal = _bus.getName();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, thisMethodName, retVal);
        }

        return retVal;
    }
563057
function MPR121(address, bus_number) {
	EventEmitter.call(this);

	this.address = address || MPR121_I2CADDR_DEFAULT;
	if (bus_number != undefined) {
		this.bus_number = bus_number;
	} else {
		this.bus_number = 1;
	}
}
152328
public void busReloaded(JsMEConfig newBus, boolean busChanged,
                            boolean destChg, boolean medChg) {

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "busReloaded");
    }
214028
public final void setGuaranteedCrossBusLinkName(String value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setGuaranteedCrossBusLinkName", value);
        getHdr2().setField(JsHdr2Access.GUARANTEEDXBUS_SET_LINKNAME, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setGuaranteedCrossBusLinkName");
    }