We need to override this even if we override calculateNaturalEndpoints,
because the default implementation depends on token calculations but
LocalStrategy may be used before tokens are set up.
510507
@Override
    public ArrayList<InetAddress> getNaturalEndpoints(RingPosition searchPosition)
    {
        ArrayList<InetAddress> l = new ArrayList<InetAddress>(1);
        l.add(FBUtilities.getBroadcastAddress());
        return l;
    }
1366192
private void doRemoveRemoteSource(RequestErrorTracker errorTracker, Request request, SettableFuture<?> future)
    {
        errorTracker.startRequest();

        FutureCallback<StatusResponse> callback = new FutureCallback<StatusResponse>() {
            @Override
            public void onSuccess(@Nullable StatusResponse response)
            {
                if (response == null) {
                    throw new PrestoException(GENERIC_INTERNAL_ERROR, "Request failed with null response");
                }
                if (response.getStatusCode() != OK.code()) {
                    throw new PrestoException(GENERIC_INTERNAL_ERROR, "Request failed with HTTP status " + response.getStatusCode());
                }
                future.set(null);
            }

            @Override
            public void onFailure(Throwable failedReason)
            {
                if (failedReason instanceof RejectedExecutionException && httpClient.isClosed()) {
                    log.error("Unable to destroy exchange source at %s. HTTP client is closed", request.getUri());
                    future.setException(failedReason);
                    return;
                }
                // record failure
                try {
                    errorTracker.requestFailed(failedReason);
                }
                catch (PrestoException e) {
                    future.setException(e);
                    return;
                }
                // if throttled due to error, asynchronously wait for timeout and try again
                ListenableFuture<?> errorRateLimit = errorTracker.acquireRequestPermit();
                if (errorRateLimit.isDone()) {
                    doRemoveRemoteSource(errorTracker, request, future);
                }
                else {
                    errorRateLimit.addListener(() -> doRemoveRemoteSource(errorTracker, request, future), errorScheduledExecutor);
                }
            }
        };

        addCallback(httpClient.executeAsync(request, createStatusResponseHandler()), callback, directExecutor());
    }
145801
@Override
    public final void reportLocalError()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "reportLocalError");

        // Only need to set to LOCAL_ERROR
        // if we are currently OK. We don't want
        // to overwrite a GLOBAL_ERROR.
        if (_healthState.isOK())
        {
            _healthState = JsHealthState.getLocalError();
        }

        if (_healthMonitor == null)
        {
            if (_messagingEngine != null && _messagingEngine instanceof JsHealthMonitor)
            {
                _healthMonitor = (JsHealthMonitor) _messagingEngine;
                _healthMonitor.reportLocalError();
            }
        }
        else
        {
            _healthMonitor.reportLocalError();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "reportLocalError");
    }
1116298
public void setCustomEndpoints(java.util.Collection<String> customEndpoints) {
        if (customEndpoints == null) {
            this.customEndpoints = null;
            return;
        }

        this.customEndpoints = new com.amazonaws.internal.SdkInternalList<String>(customEndpoints);
    }
1178533
public void accept(TokenKind tk) {
        if (token.kind == tk) {
            nextToken();
        } else {
            setErrorEndPos(token.pos);
            reportSyntaxError(S.prevToken().endPos, "expected", tk);
        }
    }
692939
private void visitFrameAfterOnMethodEntry() {
        if (!visitFramesAfterCallbacks)
            return;

        // The frame that is required after the trace guard must be
        // fully specified as 'this' is no longer an 'uninitialized this'
        if (isConstructor()) {
            List<Object> stackLocals = new ArrayList<Object>(argTypes.length + 1);
            stackLocals.add(classAdapter.getClassType().getInternalName());
            for (Type type : argTypes) {
                switch (type.getSort()) {
                    case Type.ARRAY:
                    case Type.OBJECT:
                        stackLocals.add(type.getInternalName());
                        break;
                    case Type.BOOLEAN:
                    case Type.CHAR:
                    case Type.BYTE:
                    case Type.SHORT:
                    case Type.INT:
                        stackLocals.add(INTEGER);
                        break;
                    case Type.LONG:
                        stackLocals.add(LONG);
                        break;
                    case Type.FLOAT:
                        stackLocals.add(FLOAT);
                        break;
                    case Type.DOUBLE:
                        stackLocals.add(DOUBLE);
                        break;
                }
            }
            visitFrame(F_FULL, stackLocals.size(), stackLocals.toArray(), 0, new Object[] {});
            visitInsn(NOP);
        } else {
            visitFrame(F_SAME, 0, null, 0, null);
            visitInsn(NOP);
        }
    }
1263256
@Override
    public void visitToken(DetailAST token) {
        // Failed to load ServiceClient's class, don't validate anything.
        if (this.serviceClientClass == null) {
            return;
        }

        switch (token.getType()) {
            case TokenTypes.PACKAGE_DEF:
                this.extendsServiceClient = extendsServiceClient(token);
                break;
            case TokenTypes.CTOR_DEF:
                if (this.extendsServiceClient && visibilityIsPublicOrProtected(token)) {
                    log(token, CONSTRUCTOR_ERROR_MESSAGE);
                }
                break;
            case TokenTypes.METHOD_DEF:
                if (this.extendsServiceClient && !this.hasStaticBuilder && methodIsStaticBuilder(token)) {
                    this.hasStaticBuilder = true;
                }
                break;
        }
    }
483646
public boolean overrides(Link other) {
    if (other.getStatus() == LinkStatus.ASSERTED &&
        status != LinkStatus.ASSERTED)
      return false;
    else if (status == LinkStatus.ASSERTED &&
             other.getStatus() != LinkStatus.ASSERTED)
      return true;

    // the two links are from equivalent sources of information, so we
    // believe the most recent

    return timestamp > other.getTimestamp();
  }
846914
function overrideLocEnd(toBeOverriddenNode, toOverrideNode) {
    if (options.originalText[locEnd(toOverrideNode)] === ";") {
      return;
    }
    if (options.parser === "flow") {
      toBeOverriddenNode.range = [
        toBeOverriddenNode.range[0],
        toOverrideNode.range[1]
      ];
    } else {
      toBeOverriddenNode.end = toOverrideNode.end;
    }
    toBeOverriddenNode.loc = Object.assign({}, toBeOverriddenNode.loc, {
      end: toBeOverriddenNode.loc.end
    });
  }
998389
@Override
    public void setTargetTransportChain(String newTargetTransportChain) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setTargetTransportChain", newTargetTransportChain);
        jcaManagedConnectionFactory.setTargetTransportChain(newTargetTransportChain);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setTargetTransportChain");
    }
513237
@Override
    public void visitFrame(int type, int numLocals, Object[] locals, int stackSize, Object[] stack) {
        if (!isVisitFrameRequired())
            return;

        super.visitFrame(type, numLocals, locals, stackSize, stack);
    }
977543
function() {
    this._super();

    if (!this._options.implicit) {
      this.overrideProperty('<singular>', 'item', 'set');
      this.addHelper('get<Singular>', 'item');
      this.addHelper('set<Singular>', 'set');
      this.addHelper('create<Singular>', 'create');
      this.addHelper('fetch<Singular>', 'fetch');

      this.addOverride('<foreignKey>', _.extend(function(/*relationKey*/) {
        return attr(undefined, { writable: false });
      }, { optional: true }));

      this.overrideMethod('init', 'initialize');
      this.overrideMethod('_dependents', 'dependents');
      this.overrideMethod('_reliants', 'reliants');
      this.overrideMethod('_presave', 'presave');
      this.overrideMethod('_postsave', 'postsave');
    }
  }
149855
function (node) {
                if (node.init && (node.init.type === "FunctionExpression" || node.init.type === "ArrowFunctionExpression")) {
                    _addResult(node);
                }
            }
798358
@Override
	public boolean shouldUseLtpaIfJwtAbsent() {
		// TODO Auto-generated method stub
		JwtSsoBuilderConfig jwtssobuilderConfig = getJwtSSOBuilderConfig();
		if (jwtssobuilderConfig != null) {
			return jwtssobuilderConfig.isUseLtpaIfJwtAbsent();
		}
		return true;
	}
956700
protected synchronized void requestCallback(Token tokenToPrePrepare)
                    throws ObjectManagerException
    {
        throw new InvalidStateException(this, InternalTransaction.stateTerminated, InternalTransaction.stateNames[InternalTransaction.stateTerminated]);
    }
294176
protected void _before(SarlCapacityUses uses, IExtraLanguageGeneratorContext context) {
		// Rename the function in order to produce the good features at the calls.
		for (final JvmTypeReference capacity : uses.getCapacities()) {
			final JvmType type = capacity.getType();
			if (type instanceof JvmDeclaredType) {
				computeCapacityFunctionMarkers((JvmDeclaredType) type);
			}
		}
	}
848069
private void visitOverride(AnnotatedNode node, AnnotationNode visited) {
        ClassNode annotationClassNode = visited.getClassNode();
        if (annotationClassNode.isResolved() && annotationClassNode.getName().equals("java.lang.Override")) {
            if (node instanceof MethodNode) {
                MethodNode origMethod = (MethodNode) node;
                ClassNode cNode = node.getDeclaringClass();
                ClassNode next = cNode;
                outer:
                while (next != null) {
                    Map genericsSpec = createGenericsSpec(next);
                    MethodNode mn = correctToGenericsSpec(genericsSpec, origMethod);
                    if (next != cNode) {
                        ClassNode correctedNext = correctToGenericsSpecRecurse(genericsSpec, next);
                        MethodNode found = getDeclaredMethodCorrected(genericsSpec, mn, correctedNext);
                        if (found != null) break;
                    }
                    List<ClassNode> ifaces = new ArrayList<ClassNode>();
                    ifaces.addAll(Arrays.asList(next.getInterfaces()));
                    Map updatedGenericsSpec = new HashMap(genericsSpec);
                    while (!ifaces.isEmpty()) {
                        ClassNode origInterface = ifaces.remove(0);
                        if (!origInterface.equals(ClassHelper.OBJECT_TYPE)) {
                            updatedGenericsSpec = createGenericsSpec(origInterface, updatedGenericsSpec);
                            ClassNode iNode = correctToGenericsSpecRecurse(updatedGenericsSpec, origInterface);
                            MethodNode found2 = getDeclaredMethodCorrected(updatedGenericsSpec, mn, iNode);
                            if (found2 != null) break outer;
                            ifaces.addAll(Arrays.asList(iNode.getInterfaces()));
                        }
                    }
                    ClassNode superClass = next.getUnresolvedSuperClass();
                    if (superClass!=null) {
                        next =  correctToGenericsSpecRecurse(updatedGenericsSpec, superClass);
                    } else {
                        next = null;
                    }
                }
                if (next == null) {
                    addError("Method '" + origMethod.getName() + "' from class '" + cNode.getName() + "' does not override " +
                            "method from its superclass or interfaces but is annotated with @Override.", visited);
                }
            }
        }
    }