For an identifier of the form "a.b.c.d", returns "a.b.c"
For an identifier of the form "a", returns absent
776946
public Optional<QualifiedName> getPrefix()
    {
        if (parts.size() == 1) {
            return Optional.empty();
        }

        List<String> subList = parts.subList(0, parts.size() - 1);
        return Optional.of(new QualifiedName(subList, subList));
    }
1271228
private String buildIdentifier() {
    checkForEmptyIdentifier();
    CharType boundary = nearestCharType(CharType.DOT, CharType.EOL);
    if (chars.positiveLookaheadBefore(boundary, CharType.LETTER, CharType.HYPHEN)) {
      return alphanumericIdentifier();
    } else {
      return digits();
    }
  }
1090276
def str_id(self):
        ""
        id_or_name = self.id_or_name
        if id_or_name is not None and isinstance(id_or_name, str):
            return id_or_name
        return None
389002
def get_unique_name(self, prefix):
        '''
        '''
        ident = sum(t.startswith(prefix) for t, _ in self.layers.items()) + 1
        return '%s_%d' % (prefix, ident)
29830
def get_representation(self, prefix="", suffix="\n"):
        
        res = []
        if self.hidden:
            res.append(prefix + " - " + str(self._name)
                       + " : xxxxxxxx" + suffix)
        else:
            default = self.default
            if default is None:
                default = " - "
            a = prefix + " - "
            a += str(self._name) + " : "
            if isinstance(default, types.UnicodeType):
                a += default
            else:
                a += str(default)
            a += suffix
            res.append(a)
        return res
441927
private static String getIdentifier(String target) {

        // check map
        String id = LOCATION_IDENTIFIER_MAP.get(target);
        if (id == null) {
            id = LOCATION_IDENTIFIER_PREFIX + target;
            LOCATION_IDENTIFIER_MAP.put(target, id);
        }
        return id;

    }
774593
def _escape_identifiers(self, item):
        
        if self._escape_char == '':
            return item

        for field in self._reserved_identifiers:
            if item.find('.%s' % field) != -1:
                _str = "%s%s" % (self._escape_char, item.replace('.', '%s.' % self._escape_char))
                # remove duplicates if the user already included the escape
                return re.sub(r'[%s]+'%self._escape_char, self._escape_char, _str)

        if item.find('.') != -1:
            _str = "%s%s%s" % (self._escape_char, item.replace('.', '%s.%s'%(self._escape_char, self._escape_char)),
            self._escape_char)
        else:
            _str = self._escape_char+item+self._escape_char
        # remove duplicates if the user already included the escape
        return re.sub(r'[%s]+'%self._escape_char, self._escape_char, _str)
678287
def isAlphanum(c):
    
    return ((c >= 'a' and c <= 'z') or (c >= '0' and c <= '9') or
            (c >= 'A' and c <= 'Z') or c == '_' or c == '$' or c == '\\' or (c is not None and ord(c) > 126));
704089
void scanIdentifier() {
        if (!eof) {
            StringBuilder identBuf = new StringBuilder(32);
            if (!isStopSymbol(symbol)) {
                identBuf.append(symbol);
                do {
                    char ch = buffer[pos];
                    if ((ch >= 'a') && (ch <= 'z') || (ch >= 'A') && (ch <= 'Z')
                            || !isStopSymbol(ch)) {
                        identBuf.append(ch);
                        pos++;
                    } else {
                        identifier = identBuf.toString();
                        scanSymbol();
                        return;
                    }
                } while (pos != buffer.length);
                identifier = identBuf.toString();
                symbol = 0;
                eof = true;
            } else {
                // Ident starts with incorrect char.
                symbol = 0;
                eof = true;
                throw new GenericSignatureFormatError();
            }
        } else {
            throw new GenericSignatureFormatError();
        }
    }
915399
def identifier(self):
        
        if self.primary_key not in self._data:
            return 'Unknown'
        return str(self._data[self.primary_key])
1112953
def identify( name: nil, net: nil, cc: nil, imc: nil, ssc: nil, **nn )
      name || { net: net, cc: cc, imc: imc, ssc: ssc }.merge( nn )
    end
1227697
def t_IDENTIFER(self, t):
        '
        t.type = SpecParser.reserved.get(t.value, 'IDENTIFIER')
        return t
825727
private int compareIdentifiers(String ident1, String ident2) {
        if (isInt(ident1) && isInt(ident2)) {
            return Integer.parseInt(ident1) - Integer.parseInt(ident2);
        } else {
            return ident1.compareTo(ident2);
        }
    }
566311
def identifier_cmp(a, b):
    """"""

    a_cmp, a_is_int = _to_int(a)
    b_cmp, b_is_int = _to_int(b)

    if a_is_int and b_is_int:
        # Numeric identifiers are compared as integers
        return base_cmp(a_cmp, b_cmp)
    elif a_is_int:
        # Numeric identifiers have lower precedence
        return -1
    elif b_is_int:
        return 1
    else:
        # Non-numeric identifiers are compared lexicographically
        return base_cmp(a_cmp, b_cmp)
767542
private static String getIdentitiesFromCertficate(X509Certificate aCert) {
		String tDN = aCert.getSubjectDN().toString(); 
		String tPart = "";
		if ((tDN != null)) {
			String tSplitStr[] = tDN.substring(tDN.indexOf("CN=")).split("@");
			if (tSplitStr != null && tSplitStr.length > 2
					&& tSplitStr[2] != null)
				tPart = tSplitStr[2];
		}
		return tPart;
	}
1209928
def _get_id(self):
        """"""
        return ''.join(map(str,
                           filter(is_not_None,
                                  [self.Prefix, self.Name])))
1064976
def identifier(self):
        """"""
        ident = self._json['coredata']['dc:identifier'].split(":")[-1]
        if ident != self._id:
            text = "Profile with ID {} has been merged and the new ID is "\
                   "{}.  Please update your records manually.  Files have "\
                   "been cached with the old ID.".format(self._id, ident)
            warn(text, UserWarning)
        return ident