Region prefixes are in range 02..09 with length of 3 to 5 digits
762014
def region_prefix(leading_zero = true)
      region_prefix = (rand(8) + 2).to_s + Faker.numerify( '#' * (rand(3) + 1) ).to_s
      region_prefix = '0' + region_prefix if leading_zero
      region_prefix
    end
923707
def _load_num_with_prefix(prefix, addr, region, state, base, signed, read_length=None):
        
        length = len(prefix)
        read_length = (read_length-length) if read_length else None
        condition, value, num_bytes = strtol._string_to_int(addr+length, state, region, base, signed, read_length)

        # the prefix must match
        if len(prefix) > 0:
            loaded_prefix = region.load(addr, length)
            condition = state.solver.And(loaded_prefix == state.solver.BVV(prefix), condition)
        total_num_bytes = num_bytes + length

        # negatives
        if prefix.startswith(b"-"):
            value = state.solver.BVV(0, state.arch.bits) - value
        return condition, value, total_num_bytes
55653
def _double_prefix(self):
        
        new_len = max(len(self._buf[0]) * 2, (len(self._buf[0]) + len(self._buf[1])))
        self._merge_prefix(new_len)
670223
function () {
        var user_prefixes = this.get('user_prefixes'),
            modes = this.get('modes'),
            o, max_mode;

        if (modes.length > 0) {
            o = _.indexOf(user_prefixes, _.find(user_prefixes, function (prefix) {
                return prefix.mode === 'o';
            }));

            max_mode = _.indexOf(user_prefixes, _.find(user_prefixes, function (prefix) {
                return prefix.mode === modes[0];
            }));

            if ((max_mode === -1) || (max_mode > o)) {
                this.set({"is_op": false}, {silent: true});
            } else {
                this.set({"is_op": true}, {silent: true});
            }

        } else {
            this.set({"is_op": false}, {silent: true});
        }
    }
1311099
function () {
                    var value, c = input.charCodeAt(i);
                    if ((c > 57 || c < 45) || c === 47) return;

                    if (value = $(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn|dpi|dpcm|dppx|rem|vw|vh|vmin|vm|ch)?/)) {
                        return new(tree.Dimension)(value[1], value[2]);
                    }
                }
438872
function leftPad(n, prefix, maxN) {
  const s = n.toString();
  const nchars = Math.max(2, String(maxN).length) + 1;
  const nspaces = nchars - s.length - 1;

  return prefix + ' '.repeat(nspaces) + s;
}
324876
int getUtfEncodingLimit(String s, int start, int end)
  {
    if ((end - start) * 3 <= MAX_UTF_ENCODING_SIZE) {
      return end;
    }
    int limit = MAX_UTF_ENCODING_SIZE;
    for (int i = start; i != end; i++) {
      int c = s.charAt(i);
      if (0 != c && c <= 0x7F) {
        --limit;
      } else if (c < 0x7FF) {
        limit -= 2;
      } else {
        limit -= 3;
      }
      if (limit < 0) {
        return i;
      }
    }
    return end;
  }
551790
def _si(number):
    """"""
    prefixes = ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']
    while number > 1024:
        number /= 1024.0
        prefixes.pop(0)
    return '%0.2f%s' % (number, prefixes.pop(0))
784065
function FormatNumber(regionMetaData, number, intl) {
    // We lazily parse the format description in the meta data for the region,
    // so make sure to parse it now if we haven't already done so.
    ParseFormat(regionMetaData);
    var formats = regionMetaData.formats;
    if (!formats) {
      return null;
    }
    for (var n = 0; n < formats.length; ++n) {
      var format = formats[n];
      // The leading digits field is optional. If we don't have it, just
      // use the matching pattern to qualify numbers.
      if (format.leadingDigits && !format.leadingDigits.test(number))
        continue;
      if (!format.pattern.test(number))
        continue;
      if (intl) {
        // If there is no international format, just fall back to the national
        // format.
        var internationalFormat = format.internationalFormat;
        if (!internationalFormat)
          internationalFormat = format.nationalFormat;
        // Some regions have numbers that can't be dialed from outside the
        // country, indicated by "NA" for the international format of that
        // number format pattern.
        if (internationalFormat == "NA")
          return null;
        // Prepend "+" and the country code.
        number = "+" + regionMetaData.countryCode + " " +
                 number.replace(format.pattern, internationalFormat);
      } else {
        number = number.replace(format.pattern, format.nationalFormat);
        // The region has a national prefix formatting rule, and it can be overwritten
        // by each actual number format rule.
        var nationalPrefixFormattingRule = regionMetaData.nationalPrefixFormattingRule;
        if (format.nationalPrefixFormattingRule)
          nationalPrefixFormattingRule = format.nationalPrefixFormattingRule;
        if (nationalPrefixFormattingRule) {
          // The prefix formatting rule contains two magic markers, "$NP" and "$FG".
          // "$NP" will be replaced by the national prefix, and "$FG" with the
          // first group of numbers.
          var match = number.match(SPLIT_FIRST_GROUP);
          if (match) {
            var firstGroup = match[1];
            var rest = match[2];
            var prefix = nationalPrefixFormattingRule;
            prefix = prefix.replace("$NP", regionMetaData.nationalPrefix);
            prefix = prefix.replace("$FG", firstGroup);
            number = prefix + rest;
          }
        }
      }
      return (number == "NA") ? null : number;
    }
    return null;
  }
959947
function prefixToBase(c)
{
	if (c === CP_b || c === CP_B) {
		/* 0b/0B (binary) */
		return (2);
	} else if (c === CP_o || c === CP_O) {
		/* 0o/0O (octal) */
		return (8);
	} else if (c === CP_t || c === CP_T) {
		/* 0t/0T (decimal) */
		return (10);
	} else if (c === CP_x || c === CP_X) {
		/* 0x/0X (hexadecimal) */
		return (16);
	} else {
		/* Not a meaningful character */
		return (-1);
	}
}
1004153
function charsetRangeEndUnicodeEscape(stack,c,i) {
    var charset=stack[0];
    var code=charset.chars.slice(-3)+c;
    charset.chars=charset.chars.slice(0,-3); // So just remove previous three,no 'u'
    var range=charset.ranges.pop();
    c=String.fromCharCode(parseInt(code,16));
    range=[range[0],c];
    range.lastIndex=i;
    charset.ranges.push(range);
  }
966707
function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent) {
    if (isPercent === void 0) { isPercent = false; }
    var formattedText = '';
    var isZero = false;
    if (!isFinite(value)) {
        formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);
    }
    else {
        var parsedNumber = parseNumber(value);
        if (isPercent) {
            parsedNumber = toPercent(parsedNumber);
        }
        var minInt = pattern.minInt;
        var minFraction = pattern.minFrac;
        var maxFraction = pattern.maxFrac;
        if (digitsInfo) {
            var parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);
            if (parts === null) {
                throw new Error(digitsInfo + " is not a valid digit info");
            }
            var minIntPart = parts[1];
            var minFractionPart = parts[3];
            var maxFractionPart = parts[5];
            if (minIntPart != null) {
                minInt = parseIntAutoRadix(minIntPart);
            }
            if (minFractionPart != null) {
                minFraction = parseIntAutoRadix(minFractionPart);
            }
            if (maxFractionPart != null) {
                maxFraction = parseIntAutoRadix(maxFractionPart);
            }
            else if (minFractionPart != null && minFraction > maxFraction) {
                maxFraction = minFraction;
            }
        }
        roundNumber(parsedNumber, minFraction, maxFraction);
        var digits = parsedNumber.digits;
        var integerLen = parsedNumber.integerLen;
        var exponent = parsedNumber.exponent;
        var decimals = [];
        isZero = digits.every(function (d) { return !d; });
        // pad zeros for small numbers
        for (; integerLen < minInt; integerLen++) {
            digits.unshift(0);
        }
        // pad zeros for small numbers
        for (; integerLen < 0; integerLen++) {
            digits.unshift(0);
        }
        // extract decimals digits
        if (integerLen > 0) {
            decimals = digits.splice(integerLen, digits.length);
        }
        else {
            decimals = digits;
            digits = [0];
        }
        // format the integer digits with grouping separators
        var groups = [];
        if (digits.length >= pattern.lgSize) {
            groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));
        }
        while (digits.length > pattern.gSize) {
            groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));
        }
        if (digits.length) {
            groups.unshift(digits.join(''));
        }
        formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));
        // append the decimal digits
        if (decimals.length) {
            formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');
        }
        if (exponent) {
            formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;
        }
    }
    if (value < 0 && !isZero) {
        formattedText = pattern.negPre + formattedText + pattern.negSuf;
    }
    else {
        formattedText = pattern.posPre + formattedText + pattern.posSuf;
    }
    return formattedText;
}
1346893
private int getNumBlocks(R delta) {
        ByteBuffer content = getValue(delta);
        int numBlocks = 0;

        // build numBlocks by adding together each hex digit
        for (int i = 0; i < _prefixLength; i++) {
            byte b = content.get(i);
            numBlocks = numBlocks << 4 | (b <= '9' ? b - '0' : b - 'A' + 10);
        }

        return numBlocks;
    }
125786
public function getRegionCode()
    {
        \preg_match('~^(?<region_digits>[\d]{2}).+$~', $this->getValue(), $matches);

        if (isset($matches['region_digits']) && \is_numeric($region_digits = (string) $matches['region_digits'])) {
            return (int) $region_digits;
        }
    }
1323494
function leftPad(n, prefix) {
  var s = n.toString(),
      nchars = intChars(n),
      nspaces = nchars - s.length - 1;

  prefix || (prefix = ' ');

  for (var i = 0; i < nspaces; i++) {
    prefix += ' ';
  }

  return prefix + s;
}
630267
@Override
    int guessApproxLength() {
        int total = super.guessApproxLength();
        int size = 0;
        List props;

        // Assume 40 bytes per property (string name + value)
        // Each property map may be cached in a transient, or in the base JMF (or both!)
        // If there are no properties, the names may be represented by the EMPTY
        // JMF List, in which case we do NOT want to actually get them.
        // The property will only be flattened 'once' so only count it once.
        if (jmsUserPropertyMap != null) {
            size += jmsUserPropertyMap.size();
        }
        else {
            if (getApi().isNotEMPTYlist(JsApiAccess.JMSPROPERTY_NAME)) {
                props = (List) getApi().getField(JsApiAccess.JMSPROPERTY_NAME);
                if (props != null) {
                    size += props.size();
                }
            }
        }

        if (otherUserPropertyMap != null) {
            size += otherUserPropertyMap.size();
        }
        else {
            if (getApi().isNotEMPTYlist(JsApiAccess.OTHERPROPERTY_NAME)) {
                props = (List) getApi().getField(JsApiAccess.OTHERPROPERTY_NAME);
                if (props != null) {
                    size += props.size();
                }
            }
        }

        if (jmsSystemPropertyMap != null) {
            size += jmsSystemPropertyMap.size();
        }
        else {
            if (getApi().isNotEMPTYlist(JsApiAccess.SYSTEMPROPERTY_NAME)) {
                props = (List) getApi().getField(JsApiAccess.SYSTEMPROPERTY_NAME);
                if (props != null) {
                    size += props.size();
                }
            }
        }

        if (systemContextMap != null) {
            size += systemContextMap.size();
        }
        else {
            if (getApi().isNotEMPTYlist(JsApiAccess.SYSTEMCONTEXT_NAME)) {
                props = (List) getApi().getField(JsApiAccess.SYSTEMCONTEXT_NAME);
                if (props != null) {
                    size += props.size();
                }
            }
        }

        if (mqMdSetPropertiesMap != null) {
            size += mqMdSetPropertiesMap.size();
        }
        else {
            // This field usually doesn't exist, so no need for the isNotEMPTY check
            props = (List) getHdr2().getField(JsHdr2Access.MQMDPROPERTIES_MAP_NAME);
            if (props != null) {
                size += props.size();
            }
        }

        total += size * 40;
        return total;
    }
239323
function getFormatChunksFrom (rawValues, prefix) {
      getFormatChunksFrom_accumulator.length = 0;

      var rawValuesLength = rawValues.length;
      var i;

      for (i = 0; i < rawValuesLength; i++) {
        getFormatChunksFrom_accumulator.push('_' + prefix + '_' + i);
      }

      return getFormatChunksFrom_accumulator;
    }