This function can be overridden by subclasses to use different heuristics.
<b>It MUST return a 'safe' value,
one whose modification will not affect this object.</b>

@hide draft / provisional / internal are hidden on Android
15785
protected Calendar guessCalendar() {
        ULocale calLocale = getAvailableLocale(TYPE_CALENDAR);
        if (calLocale == null) {
            calLocale = ULocale.US;
        }
        return Calendar.getInstance(getTimeZone(), calLocale);
    }
397907
public boolean get() {
		switch (state) {
			case UNSET:
				return valueIfUnset;
			case FALSE:
				return false;
			case TRUE:
				return true;
			case CONFLICTING:
				return valueIfConflicting;
			default:
				throw new RuntimeException("Unknown state");
		}
	}
563130
public IsNullValue toExceptionValue() {
        if (getBaseKind() == NO_KABOOM_NN) {
            return new IsNullValue(kind | EXCEPTION, locationOfKaBoom);
        }
        return instanceByFlagsList[(getFlags() | EXCEPTION) >> FLAG_SHIFT][getBaseKind()];
    }
777559
T unsafeGetIfOpened() {

        if (innerObject != null && innerObject.getState() == IOObject.IOObjectState.OPENED) {
            return innerObject;
        }
        return null;
    }
601017
@Nullable
  public static ValueAnimator createValueAnimator(Drawable drawable, int maxDurationMs) {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
      return null;
    }

    if (drawable instanceof AnimatedDrawable2) {
      return AnimatedDrawable2ValueAnimatorHelper.createValueAnimator(
          (AnimatedDrawable2) drawable,
          maxDurationMs);
    }
    return null;
  }
885847
public static boolean isValueReference(String value)
    {
        if (value == null)
        {
            throw new NullPointerException("value");
        }

        int start = value.indexOf("#{");
        if (start < 0)
        {
            return false;
        }

        int end = value.lastIndexOf('}');
        return (end >= 0 && start < end);
    }
254987
@Override
  protected final CompletableFuture<Double> getValue() {
    double rounder = 1 / this.minStep;
    return getDoubleValue()
        .thenApply(d -> d == null ? null : Math.round(d * rounder) / rounder)
        .thenApply(
            d -> {
              if (d != null) {
                if (d < minValue) {
                  LOGGER.warn(
                      "Detected value out of range "
                          + d
                          + ". Returning min value instead. Characteristic "
                          + this);
                  return minValue;
                }
                if (d > maxValue) {
                  LOGGER.warn(
                      "Detected value out of range "
                          + d
                          + ". Returning max value instead. Characteristic "
                          + this);
                  return maxValue;
                }
                return d;
              }
              return null;
            });
  }
260794
public int minValue()
    {
        final int initialValue = this.initialValue;
        int min = size == 0 ? initialValue : Integer.MAX_VALUE;

        final int[] entries = this.entries;
        @DoNotSub final int length = entries.length;

        for (@DoNotSub int i = 1; i < length; i += 2)
        {
            final int value = entries[i];
            if (value != initialValue)
            {
                min = Math.min(min, value);
            }
        }

        return min;
    }
585137
public final int getMinArity() {
    // NOTE(nicksantos): There are some native functions that have optional
    // parameters before required parameters. This algorithm finds the position
    // of the last required parameter.
    int i = 0;
    int min = 0;
    for (Node n : getParameters()) {
      i++;
      if (!n.isOptionalArg() && !n.isVarArgs()) {
        min = i;
      }
    }
    return min;
  }
1074501
public boolean booleanValue()
    {
        final String value = getInternal(null, false);
        if (value == null) {
            return false;
        }
        return toBoolean(value);
    }
1163219
protected Val nextSimpleValue() throws IOException {
      switch (currentValue.getKey()) {
         case NULL:
         case STRING:
         case BOOLEAN:
         case NUMBER:
            Val object = currentValue.v2;
            consume();
            return object;
         default:
            throw new IOException("Expecting VALUE, but found " + jsonTokenToStructuredElement(null));
      }
   }
440490
@Override
  public ValueHolder<V> getAndRemove(final K key) throws StoreAccessException {
    checkKey(key);

    getAndRemoveObserver.begin();

    final AtomicReference<ValueHolder<V>> valueHolderAtomicReference = new AtomicReference<>();
    BiFunction<K, OffHeapValueHolder<V>, OffHeapValueHolder<V>> computeFunction = (mappedKey, mappedValue) -> {
      long now = timeSource.getTimeMillis();
      if (mappedValue == null || mappedValue.isExpired(now)) {
        if (mappedValue != null) {
          onExpirationInCachingTier(mappedValue, key);
        }
        return null;
      }
      mappedValue.detach();
      valueHolderAtomicReference.set(mappedValue);
      return null;
    };

    try {
      backingMap().compute(key, computeFunction, false);
      ValueHolder<V> result = valueHolderAtomicReference.get();
      if (result == null) {
        getAndRemoveObserver.end(LowerCachingTierOperationsOutcome.GetAndRemoveOutcome.MISS);
      } else {
        getAndRemoveObserver.end(LowerCachingTierOperationsOutcome.GetAndRemoveOutcome.HIT_REMOVED);
      }
      return result;
    } catch (RuntimeException re) {
      throw handleException(re);
    }
  }
395871
public VALUEFROM decodeFromRaw(Object o) {
        if (o == null && !isOptional()) return null;
        return decodeFromRawInternal(o);
    }
887273
function safelyToThen(maybeThenable) {
  // Promise Standard 2.3.3.1
  let then =
    maybeThenable instanceof IPromise
      ? IPromise.prototype.then
      : maybeThenable && maybeThenable.then;
  if (
    maybeThenable &&
    (Shared.isFunction(maybeThenable) || Shared.isObject(maybeThenable)) &&
    Shared.isFunction(then)
  ) {
    return function applyThen() {
      then.apply(maybeThenable, arguments);
    };
  }
}
1232906
public LongSubject hasValueThat() {
    if (actual() == null || !actual().isPresent()) {
      isPresent(); // fails
      return ignoreCheck().that(0L);
    } else {
      return check("getAsLong()").that(actual().getAsLong());
    }
  }
656704
public T getValue() {
    try {
      value = parse(originalParameter);
    } catch (InvalidParameterException e) {
      throw new WebApplicationException(onError(e));
    }
    return value;
  }
128880
Expr nullSafe() {
		Expr expr = unary();
		for (Tok tok=peek(); tok.sym==Sym.NULL_SAFE; tok=peek()) {
			move();
			expr = new NullSafe(expr, unary(), location);
		}
		return expr;
	}