Warn if the user's target API is less than the current minimum
    recommendation
7306
def check_target_api(api, arch):
    

    if api >= ARMEABI_MAX_TARGET_API and arch == 'armeabi':
        raise BuildInterruptingException(
            'Asked to build for armeabi architecture with API '
            '{}, but API {} or greater does not support armeabi'.format(
                api, ARMEABI_MAX_TARGET_API),
            instructions='You probably want to build with --arch=armeabi-v7a instead')

    if api < MIN_TARGET_API:
        warning('Target API {} < {}'.format(api, MIN_TARGET_API))
        warning(OLD_API_MESSAGE)
618019
function checkApiKey(key) {
  if (!GLOBAL.config.apis || !GLOBAL.config.apis[key]) {
    GLOBAL.error('no GLOBAL.config.apis.bing');
    return false;
  }
  return true;
}
795182
private static Matcher<Tree> shouldAllow(RestrictedApi api) {
    try {
      return Matchers.hasAnyAnnotation(api.whitelistAnnotations());
    } catch (MirroredTypesException e) {
      return Matchers.hasAnyAnnotation(e.getTypeMirrors());
    }
  }
307377
def _is_version_range(req):
    """"""

    assert len(req.specifier) > 0
    specs = list(req.specifier)
    if len(specs) == 1:
        # "foo > 2.0" or "foo == 2.4.3"
        return specs[0].operator != '=='
    else:
        # "foo > 2.0, < 3.0"
        return True
587922
def _check_range(self, value):
        """"""
        if self.min is None and self.max is None:
            return

        measure = self.measure(value)
        prefix = "Value (%s) for parameter %s is invalid.  %s"

        if self.min is not None and measure < self.min:
            message = prefix % (value, self.name,
                                self.lower_than_min_template % self.min)
            raise InvalidParameterValueError(message)

        if self.max is not None and measure > self.max:
            message = prefix % (value, self.name,
                                self.greater_than_max_template % self.max)
            raise InvalidParameterValueError(message)
1051686
def _get_min_addr(self):
        

        if not self._regions:
            if self.project.arch.name != "Soot":
                l.error("self._regions is empty or not properly set.")
            return None

        return next(self._regions.irange())
1302997
def rule_low_registers(self, arg):
        """"""
        r_num = self.check_register(arg)
        if r_num > 7:
            raise iarm.exceptions.RuleError(
                "Register {} is not a low register".format(arg))
909523
def q_limited(self):
        
        if (self.q >= self.q_max) or (self.q <= self.q_min):
            return True
        else:
            return False
981148
def toggle_minmax(self, state):
        """"""
        self.sig_option_changed.emit('minmax', state)
        self.model.minmax = state
806612
def check_ndk_api(ndk_api, android_api):
    """"""
    if ndk_api > android_api:
        raise BuildInterruptingException(
            'Target NDK API is {}, higher than the target Android API {}.'.format(
                ndk_api, android_api),
            instructions=('The NDK API is a minimum supported API number and must be lower '
                          'than the target Android API'))

    if ndk_api < MIN_NDK_API:
        warning(OLD_NDK_API_MESSAGE)
437962
public void setUserDetectorThreshold(int threshold) {
        String minPriority = ProjectFilterSettings.getIntPriorityAsString(threshold);
        filterSettings.setMinPriority(minPriority);
    }
1213070
def maybe_rate_limit(client, headers, atexit=False):
    """"""
    # pylint: disable=fixme
    # pylint: disable=global-statement
    # FIXME: Yes, I know this is not great. We'll fix it later. :-)
    global LAST_CLIENT, LAST_HEADERS

    if LAST_CLIENT and LAST_HEADERS:
        # Wait based on previous client/headers
        rate_limit(LAST_CLIENT, LAST_HEADERS, atexit=atexit)

    LAST_CLIENT = copy.copy(client)
    LAST_HEADERS = copy.copy(headers)
767136
def is_instance_throughput_too_low(self, inst_id):
        
        r = self.instance_throughput_ratio(inst_id)
        if r is None:
            logger.debug("{} instance {} throughput is not "
                         "measurable.".format(self, inst_id))
            return None
        too_low = r < self.Delta
        if too_low:
            logger.display("{}{} instance {} throughput ratio {} is lower than Delta {}.".
                           format(MONITORING_PREFIX, self, inst_id, r, self.Delta))
        else:
            logger.trace("{} instance {} throughput ratio {} is acceptable.".
                         format(self, inst_id, r))
        return too_low
1326015
private void ensureMinimum() {
        int belowMin = minEndpoints - endpoints.size();
        if (belowMin > 0) {
            LOGGER.debug(logIdent(hostname, this) + "Service is {} below minimum, filling up.", belowMin);

            synchronized (epMutex) {
                for (int i = 0; i < belowMin; i++) {
                    Endpoint endpoint = endpointFactory.create(hostname, bucket, username, password, port, ctx);
                    endpoints.add(endpoint);
                    endpointStates.register(endpoint, endpoint);
                    endpoint.connect().subscribe(new Subscriber<LifecycleState>() {
                        @Override
                        public void onCompleted() { /* ignored on purpose */ }

                        @Override
                        public void onError(Throwable e) {
                            LOGGER.warn(logIdent(hostname, PooledService.this)
                                + "Got an error while connecting endpoint!", e);
                        }

                        @Override
                        public void onNext(LifecycleState state) { /* ignored on purpose */ }
                    });
                }

                LOGGER.debug(logIdent(hostname, PooledService.this)
                        + "New number of endpoints is {}", endpoints.size());
            }
        }
    }
829406
function isOptionalIntAbove(value, minimum) {

  if (_.isUndefined(value)) {
    return true;
  }

  if (!_.isInteger(value) || value < minimum) {
    return false;
  }

  return true;
}
575454
def setpreferredapi(api):
    
    global __PREFERRED_API
    if __SELECTED_API is not None:
        raise RuntimeError("A Qt api {} was already selected"
                           .format(__SELECTED_API))

    if api.lower() not in {"pyqt4", "pyqt5", "pyside", "pyside2"}:
        raise ValueError(api)
    __PREFERRED_API = api.lower()
609095
def warn(self, msg, *args, **kwargs):
    """"""
    if six.PY3:
      warnings.warn("The 'warn' method is deprecated, use 'warning' instead",
                    DeprecationWarning, 2)
    self.log(logging.WARN, msg, *args, **kwargs)