/*
(non-Javadoc)

@see com.ibm.ws.sib.processor.impl.interfaces.DestinationHandler#hasLocal()
16208
@Override
    public boolean hasLocal()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "hasLocal");

        boolean hasLocal = false;

        // If this alias scopes the set of possible queue points then to qualify
        // as having a local one it must be in this set.
        if (_hasScopedMessagePoints)
        {
            if (_singleScopedQueuePointME != null)
            {
                if (_singleScopedQueuePointME.equals(getMessageProcessor().getMessagingEngineUuid()))
                    hasLocal = true;
            }
            else if ((_scopedQueuePointMEs != null) && _scopedQueuePointMEs.contains(getMessageProcessor().getMessagingEngineUuid()))
                hasLocal = true;
        }

        // Because we can't trust the scoped set being up-to-date with the
        // target destination (which could have removed an ME and hence queue point
        // since the alias was created) we still check that the target has
        // a local queue point.
        if (hasLocal || !_hasScopedMessagePoints)
            hasLocal = _targetDestinationHandler.hasLocal();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "hasLocal", Boolean.valueOf(hasLocal));

        return hasLocal;
    }
134098
protected CompletableFuture<QueryResponse> queryLocal(QueryEntry entry) {
    CompletableFuture<QueryResponse> future = new CompletableFuture<>();
    sequenceQuery(entry, future);
    return future;
  }
858580
public boolean isLocaleIndependent() {

        CmsFile file = getFile();
        if (CmsResourceTypeXmlContainerPage.isContainerPage(file)
            || OpenCms.getResourceManager().matchResourceType(
                CmsResourceTypeXmlContainerPage.GROUP_CONTAINER_TYPE_NAME,
                file.getTypeId())
            || OpenCms.getResourceManager().matchResourceType(
                CmsResourceTypeXmlContainerPage.INHERIT_CONTAINER_CONFIG_TYPE_NAME,
                file.getTypeId())) {
            return true;
        }

        try {
            I_CmsResourceType resourceType = OpenCms.getResourceManager().getResourceType(file);
            if ((resourceType instanceof CmsResourceTypeLocaleIndependentXmlContent)
                || (resourceType instanceof CmsResourceTypeXmlAdeConfiguration)) {
                return true;
            }
        } catch (Exception e) {
            // ignore
        }
        return false;

    }
715443
public boolean isLocalHostname(String host) {
		checkState();
		try {
			InetAddress[] addresses = InetAddress.getAllByName(host);

			Set<InetAddress> stackAddresses = new HashSet<InetAddress>();

			for (ListeningPoint lp : this.provider.getListeningPoints()) {
				InetAddress tmp = InetAddress.getByName(lp.getIPAddress());
				if (tmp != null)
					stackAddresses.add(tmp);
			}

			for (InetAddress ia : addresses) {
				if (stackAddresses.contains(ia))
					return true;
			}

		} catch (UnknownHostException e) {
			if (tracer.isFineEnabled()) {
				tracer.fine("Unknown host",e);
			}
		}

		return false;
	}
1253497
private boolean isAvailable(
                                BaseDestinationHandler destinationHandler,
                                DestinationAvailability destinationAvailability)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "isAvailable", new Object[] { destinationHandler, destinationAvailability });

        boolean sendAvailable = false;
        boolean receiveAvailable = false;

        if (destinationAvailability == DestinationAvailability.SEND
            || destinationAvailability == DestinationAvailability.SEND_AND_RECEIVE)
        {
            // Destination must be a non-mediated destination with a local queue point
            if (destinationHandler.hasLocal())
            {
                sendAvailable = true;
            }

            if (sendAvailable)
            {
                if ((destinationHandler.definition.isSendAllowed())
                    && (isLocalizationAvailable(destinationHandler, destinationAvailability)))
                {
                    sendAvailable = true;
                }
                else
                {
                    sendAvailable = false;
                }
            }
        }

        if (destinationAvailability == DestinationAvailability.RECEIVE
            || destinationAvailability == DestinationAvailability.SEND_AND_RECEIVE)
        {
            // Destination must have a queue point on the ME to which the connection is connected
            if (destinationHandler.hasLocal())
            {
                receiveAvailable = true;
            }

            if (receiveAvailable)
            {
                if ((destinationHandler.definition.isReceiveAllowed())
                    && (isLocalizationAvailable(destinationHandler, destinationAvailability)))
                {
                    receiveAvailable = true;
                }
                else
                {
                    receiveAvailable = false;
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "isAvailable", new Object[] { new Boolean(sendAvailable || receiveAvailable) });

        return (sendAvailable || receiveAvailable);
    }
1033542
public <T> Local<T> getThis(TypeId<T> type) {
        if (thisLocal == null) {
            throw new IllegalStateException("static methods cannot access 'this'");
        }
        return coerce(thisLocal, type);
    }
585063
@TargetApi(Build.VERSION_CODES.FROYO)
    public static boolean hasLocationFeature(Context context) {
        return hasLocationFeature(context.getPackageManager());
    }
921063
@Override
    public boolean has(int index, Scriptable start)
    {
        if (externalData != null) {
            return (index < externalData.getArrayLength());
        }
        return null != slotMap.query(null, index);
    }
438540
function isLocalCall (node) {
  return nodeType(node, exactMatch(nodeTypes.FUNCTIONCALL)) &&
        minNrOfChildren(node, 1) &&
        nodeType(node.children[0], exactMatch(nodeTypes.IDENTIFIER)) &&
        expressionType(node.children[0], basicRegex.FUNCTIONTYPE) &&
        !expressionType(node.children[0], basicRegex.EXTERNALFUNCTIONTYPE) &&
        nrOfChildren(node.children[0], 0)
}
33859
public void setLocal(final int i, final V value)
            throws IndexOutOfBoundsException {
        if (i >= locals) {
            throw new IndexOutOfBoundsException(
                    "Trying to access an inexistant local variable " + i);
        }
        values[i] = value;
    }
671475
public boolean isLocal() {
        return
            (owner.kind.matches(KindSelector.VAL_MTH) ||
             (owner.kind == TYP && owner.isLocal()));
    }
1185771
public void storeLocal(LocalVariable local) {
        if (local == null) {
            throw new NullPointerException("No local variable specified");
        }
        int stackAdjust = local.getType().isDoubleWord() ? -2 : -1;
        mInstructions.new StoreLocalInstruction(stackAdjust, local);
    }
384569
private void determineIsLocal() {
        // Loop through each channel in the outbound chain represented by this
        // endpoint
        int i = 0;
        for (OutboundChannelDefinition def : this.outboundChannelDefs) {
            if (LocalChannelFactory.class.isAssignableFrom(def.getOutboundFactory())) {
                // Found Local channel factory.
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Found LocalChannelFactory interface: " + def.getOutboundFactory());
                }
                this.localChannelIndex = i;
                break;
            }
            i++;
        }
    }
1224223
@JSFProperty(defaultValue = "false", tagExcluded = true)
    public boolean isLocalValueSet()
    {
        Object value = getStateHelper().get(PropertyKeys.localValueSet);
        if (value != null)
        {
            return (Boolean) value;        
        }
        return false;
    }
1336056
public boolean isLocal()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "isLocal");
    
    boolean isLocal = false;
    if (foreignDest.getResolvedDestinationHandler().getLocalLocalizationPoint() != null)
      isLocal = true;
      
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "isLocal", new Boolean(isLocal));
    
    return isLocal;
  }
1206917
function isLocal(url) {
        var loc = document.location,
            reg = new RegExp("^\\.|^\/(?!\/)|^[\\w]((?!://).)*$|" + loc.protocol + "//" + loc.host);
        return url.match(reg);
      }
1347431
@Override
    public void registerDestination(boolean hasLocal,
                                    boolean isDeleted)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc,
                        "registerDestination",
                        new Object[] {
                                      Boolean.valueOf(hasLocal),
                                      Boolean.valueOf(isDeleted),
                                      this });
        // Dont register temporary destinations or system destinations.
        if (!_baseDestinationHandler.isTemporary() && !_baseDestinationHandler.isSystem())
        {
            if (_pToPLocalMsgsItemStream != null && !(_pToPLocalMsgsItemStream instanceof MQLinkMessageItemStream))
                _localisationManager.registerDestination();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "registerDestination");
    }