Set the best local transport candidate we have offered and accepted by
the other endpoint.

@param bestLocalCandidate the acceptedLocalCandidate to set
481279
private void setAcceptedLocalCandidate(TransportCandidate bestLocalCandidate) {
        for (int i = 0; i < resolver.getCandidateCount(); i++) {
            // TODO FIX The EQUAL Sentence
            if (resolver.getCandidate(i).getIp().equals(bestLocalCandidate.getIp())
                    && resolver.getCandidate(i).getPort() == bestLocalCandidate.getPort()) {
                acceptedLocalCandidate = resolver.getCandidate(i);
                return;
            }
        }
        LOGGER.fine("BEST: ip=" + bestLocalCandidate.getIp() + " port=" + bestLocalCandidate.getPort() + " has not been offered.");
        // throw new XMPPException("Local transport candidate has not be offered.");
    }
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);
    }
980251
def _setEndpoint(self, location):
    '''
    
    '''
    # suds 0.3.7+ supports multiple wsdl services, but breaks setlocation :(
    # see https://fedorahosted.org/suds/ticket/261
    try:
      self._sforce.set_options(location = location)
    except:
      self._sforce.wsdl.service.setlocation(location)

    self._location = location
1300749
public void setCPOptionLocalService(
		com.liferay.commerce.product.service.CPOptionLocalService cpOptionLocalService) {
		this.cpOptionLocalService = cpOptionLocalService;
	}
337741
function LocalTransport(config) {
  this.id = config && config.id || null;
  this.networkId = this.id || null;
  this['default'] = config && config['default'] || false;
  this.agents = {};
}
643086
protected Locale getBestLocale(HttpServletRequest request, Map<String,Locale> supportedLocales) throws ServletException {
		@SuppressWarnings("unchecked")
		Enumeration<String> acceptLanguages = request.getHeaders("accept-language");
		if(acceptLanguages == null) {
			// No header, use default
			return getDefaultLocale(request, supportedLocales);
		}
		// Select the best locale from the Accept-Language header(s).
		Locale bestExact = null;
		float bestExactQ = Float.NaN;
		Locale bestApprox = null;
		float bestApproxQ = Float.NaN;
		while(acceptLanguages.hasMoreElements()) {
			for(String pair : StringUtility.splitString(acceptLanguages.nextElement(), ',')) {
				String acceptLanguage;
				float q;
				int semiPos = pair.indexOf(';');
				if(semiPos == -1) {
					acceptLanguage = pair.trim();
					q = 1;
				} else {
					acceptLanguage = pair.substring(0, semiPos).trim();
					try {
						q = Float.parseFloat(pair.substring(semiPos + 1).trim());
					} catch(NumberFormatException e) {
						// Invalid value, use q=0 to ignore the language
						q = 0;
					}
				}
				if(
					q > 0
					&& (Float.isNaN(bestExactQ) || q > bestExactQ)
					&& (Float.isNaN(bestApproxQ) || q > bestApproxQ)
				) {
					MatchedLocale match = getBestMatch(supportedLocales, acceptLanguage);
					if(match != null) {
						if(match.exact) {
							if(Float.isNaN(bestExactQ) || q > bestExactQ) {
								bestExact = match.locale;
								bestExactQ = q;
							}
						} else {
							if(Float.isNaN(bestApproxQ) || q > bestApproxQ) {
								bestApprox = match.locale;
								bestApproxQ = q;
							}
						}
					}
				}
			}
		}
		// Select best exact, best approximate, then default
		Locale selected;
		if(bestExact != null) {
			selected = bestExact;
		} else if(bestApprox != null) {
			selected = bestApprox;
		} else {
			selected = getDefaultLocale(request, supportedLocales);
		}
		return selected;
	}
1036652
public void setLocalityLevel(LocalityLevel level) {
    localityRequired = level;
    lastLocality = level;
    localityWaitStarted = false;
    localityWaitStartTime = Long.MAX_VALUE;
  }
492362
function setLocalDescription(description, success, failure) {
    this.localDescription = description

    if (this.remoteDescription && this.readyState === "new") {
        open(this)
    }

    success && success()
}
726310
private void setAssistantLocal(AssistantLocal newAssistantLocal) {
        this.assistantLocal = newAssistantLocal;
        scheduleRuleRegistry.setAssistantLocal(newAssistantLocal);
        transletRuleRegistry.setAssistantLocal(newAssistantLocal);
        templateRuleRegistry.setAssistantLocal(newAssistantLocal);
    }
89476
public void setWorkflowInstanceLinkLocalService(
		com.liferay.portal.kernel.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) {
		this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService;
	}
163531
protected void setLocalTransactionCurrent(ServiceReference<LocalTransactionCurrent> ref) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "setLocalTransactionCurrent", "setting " + ref);
        }
        localTransactionCurrentRef.setReference(ref);
    }
881491
@Override protected void setupLocal(){
    assert(_localmodel == null);
    super.setupLocal();
    if (model_info().get_params()._elastic_averaging) {
      //Load my local model from DKV, to continue training
      _localmodel = DKV.getGet(_sharedmodel.localModelInfoKey(H2O.SELF));
      if (_localmodel != null) {
        if (!Arrays.equals(_localmodel.units, _sharedmodel.units)) {
          _localmodel = IcedUtils.deepCopy(_sharedmodel);
        } else {
          //Make sure that the local model has the right global (shared) parameters after checkpoint restart!
          _localmodel.set_params(_sharedmodel.get_params(), _sharedmodel._model_id);
          _localmodel.set_processed_global(_sharedmodel.get_processed_global());
        }
      }
      else {
        // first time around - use the randomized initial weights and don't spread the shared (random) model
        _localmodel = IcedUtils.deepCopy(_sharedmodel);
        _sharedmodel = null;
      }
    } else {
      _localmodel = _sharedmodel;
      _sharedmodel = null;
    }
    _localmodel.set_processed_local(0);
  }
1314314
public void setNoLocal(boolean noLocal)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setNoLocal", Boolean.valueOf(noLocal));

        this.noLocal = noLocal;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setNoLocal");
    }
269132
private void addRemoteCandidate(TransportCandidate rc) {
        // Add the candidate to the list
        if (rc != null) {
            if (acceptableTransportCandidate(rc, offeredCandidates)) {
                synchronized (remoteCandidates) {
                    remoteCandidates.add(rc);
                }

                // Check if the new candidate can be used.
                checkRemoteCandidate(rc);
            }
        }
    }
425369
protected static final LocalDate moveDate (final MoveableHoliday aMoveableHoliday, final LocalDate aFixed)
  {
    for (final MovingCondition aMoveCond : aMoveableHoliday.getMovingCondition ())
      if (shallBeMoved (aFixed, aMoveCond))
        return _moveDate (aMoveCond, aFixed);
    return aFixed;
  }
248569
public void setCandidateProperties(GlobalProperties gProps, LocalProperties lProps, Channel initialInput) {
		this.cachedPlans = Collections.<PlanNode>singletonList(new SolutionSetPlanNode(this, "SolutionSet ("+this.getOperator().getName()+")", gProps, lProps, initialInput));
	}
480673
private void addValidRemoteCandidate(TransportCandidate remoteCandidate) {
        // Add the candidate to the list
        if (remoteCandidate != null) {
            synchronized (validRemoteCandidates) {
                LOGGER.fine("Added valid candidate: " + remoteCandidate.getIp() + ":" + remoteCandidate.getPort());
                validRemoteCandidates.add(remoteCandidate);
            }
        }
    }