Convert an integer warning priority threshold value to a String.
485056
public static String getIntPriorityAsString(int prio) {
        String minPriority;
        switch (prio) {
        case Priorities.EXP_PRIORITY:
            minPriority = ProjectFilterSettings.EXPERIMENTAL_PRIORITY;
            break;
        case Priorities.LOW_PRIORITY:
            minPriority = ProjectFilterSettings.LOW_PRIORITY;
            break;
        case Priorities.NORMAL_PRIORITY:
            minPriority = ProjectFilterSettings.MEDIUM_PRIORITY;
            break;
        case Priorities.HIGH_PRIORITY:
            minPriority = ProjectFilterSettings.HIGH_PRIORITY;
            break;
        default:
            minPriority = ProjectFilterSettings.DEFAULT_PRIORITY;
            break;
        }
        return minPriority;
    }
682663
def Alphanumeric(msg=None):
    '''
    
    '''
    def fn(value):
        if not any([
            isinstance(value, numbers.Integral),
            (isinstance(value, float) and value.is_integer()),
            (isinstance(value, basestring) and value.isalnum())
        ]):
            raise Invalid(msg or (
                'Invalid input <{0}>; expected an integer'.format(value))
            )
        else:
            return value
    return fn
1296321
protected static int safeToInt (String intstr)
    {
        if (!StringUtil.isBlank(intstr)) {
            try {
                return Integer.parseInt(intstr);
            } catch (NumberFormatException nfe) {
            }
        }
        return -1;
    }
707509
public String toEncodedString() {
        // Priority threshold
        StringBuilder buf = new StringBuilder();
        buf.append(getMinPriority());

        // Encode enabled bug categories. Note that these aren't really used for
        // much.
        // They only come in to play when parsed by a version of FindBugs older
        // than 1.1.
        buf.append(FIELD_DELIMITER);
        for (Iterator<String> i = activeBugCategorySet.iterator(); i.hasNext();) {
            buf.append(i.next());
            if (i.hasNext()) {
                buf.append(LISTITEM_DELIMITER);
            }

        }

        // Whether to display false warnings
        buf.append(FIELD_DELIMITER);
        buf.append(displayFalseWarnings ? "true" : "false");

        buf.append(FIELD_DELIMITER);
        buf.append(getMinRank());

        return buf.toString();
    }
772991
private Integer checkString(final String value)
	{
		Integer val = 50;
		if (value != null && !value.isEmpty())
		{
			if (value.endsWith("%"))
			{
				final String sVal = value.substring(0, value.length() - 1);
				if (StringUtils.isNumeric(sVal))
				{
					val = Integer.valueOf(sVal);
				}
			}
			else
			{
				if (StringUtils.isNumeric(value))
				{
					val = Integer.valueOf(value);
				}

			}
		}
		return val;
	}
748320
private static int portStringToInt(String value) {
        int port;
        try {
            port = Integer.parseInt(value);
        } catch (NumberFormatException e) {
            throw new HAProxyProtocolException("invalid port: " + value, e);
        }

        if (port <= 0 || port > 65535) {
            throw new HAProxyProtocolException("invalid port: " + value + " (expected: 1 ~ 65535)");
        }

        return port;
    }
499931
function formatPriority(priority) {
        var s = '';
        s += (priority >> 24);
        s += ' | ';
        s += (priority >> 8) & 0xFFFF;
        s += ' | ';
        s += priority & 0xFF;
        return s;
    }
561469
def _positive_int(integer_string, strict=False, cutoff=None):
    
    ret = int(integer_string)

    if ret < 0 or (ret == 0 and strict):
        raise ValueError()
    if cutoff:
        ret = min(ret, cutoff)

    return ret
640680
def convertToPositiveInt(val=None, invalidDefault=0):
    '''
        
    '''
    if val is None:
        return invalidDefault

    try:
        val = int(val)
    except:
        return invalidDefault

    if val < 0:
        return invalidDefault

    return val
616135
def get_prep_value(self, value):
		
		if value is None or value == "":
			return None
		if isinstance(value, six.string_types):
			value = _hex_string_to_unsigned_integer(value)
		if _using_signed_storage():
			value = _unsigned_to_signed_integer(value)
		return value
1131992
private static String unsignedToString(int value) {
        if (value >= 0) {
            return Integer.toString(value);
        } else {
            return Long.toString((value) & 0x00000000FFFFFFFFL);
        }
    }
956941
def p_delays_intnumber(self, p):
        ''
        p[0] = DelayStatement(
            IntConst(p[2], lineno=p.lineno(1)), lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
572366
def build_message(self, stat, value):
        """"""
        return ' '.join((self.prefix + str(stat), str(value), str(round(time()))))
868086
def NonNegIntStringToInt(int_string, problems=None):
  """"""
  # Will raise TypeError unless a string
  match = re.match(r"^(?:0|[1-9]\d*)$", int_string)
  # Will raise ValueError if the string can't be parsed
  parsed_value = int(int_string)

  if parsed_value < 0:
    raise ValueError()
  elif not match and problems is not None:
    # Does not match the regex, but it's an int according to Python
    problems.InvalidNonNegativeIntegerValue(int_string)

  return parsed_value
446489
def version_to_int(value):
    
    # remove '-SNAPSHOT'
    value = value.replace('-SNAPSHOT', '')
    # remove '-RCx'
    if '-RC' in value:
        value = value.split('-RC', 1)[0]
    try:
        return int(value.split('.')[1])
    except (ValueError, IndexError):
        return
433844
def ints_to_string(ints):
    
    if not isinstance(ints, list):
        return six.u(str(ints))

    return '|'.join(six.u(str(l)) for l in ints)
787178
def get_output_str(item, detect_numerics, precision, sign_value):
    """"""
    if detect_numerics:
        item = _convert_to_numeric(item)
    if isinstance(item, float):
        item = round(item, precision)
    try:
        item = '{:{sign}}'.format(item, sign=sign_value)
    except (ValueError, TypeError):
        pass
    return to_unicode(item)