This function reads a name from a byte array which was created
by the gssExportName() method.

@param name_tok The GSS name token.
@return The name from the GSS name token.
497046
public static GSSExportedName decodeGSSExportedName(byte[] name_tok) {
        if (name_tok != null) {
            ByteArrayInputStream bais = new ByteArrayInputStream(name_tok);
            try {
                // GSSToken tag 1 0x04
                int t1 = bais.read();
                if (t1 == ASN_TAG_NT_EXPORTED_NAME1) {
                    // GSSToken tag 2 0x01
                    int t2 = bais.read();
                    if (t2 == ASN_TAG_NT_EXPORTED_NAME2) {
                        // read the two length bytes
                        int l = bais.read() << 8;
                        l += bais.read();

                        // read the oid
                        byte[] oid_arr = new byte[l];
                        bais.read(oid_arr, 0, l);
                        String oid = decodeOID(oid_arr);

                        int l1 = bais.read();
                        int l2 = bais.read();
                        int l3 = bais.read();
                        int l4 = bais.read();

                        int name_len = (l1 << 24) + (l2 << 16) + (l3 << 8) + l4;
                        byte[] name_arr = new byte[name_len];
                        bais.read(name_arr, 0, name_len);
                        String name = new String(name_arr);
                        return new GSSExportedName(name, oid);
                    }
                }
            } catch (Exception ex) {
                ex.printStackTrace();
                // do nothing, return null
            }
        }
        return null;
    }
1145005
String getFilename(TypeElement te, String fwk) {
		return getFilename(te.getSimpleName().toString(), fwk);
	}
701525
def namedb_name_fields_check( name_rec ):
    

    if not name_rec.has_key('name'):
        raise Exception("BUG: name record has no name")

    # extract namespace ID if it's not already there 
    if not name_rec.has_key('namespace_id'):
        name_rec['namespace_id'] = get_namespace_from_name( name_rec['name'] )

    # extract name_hash if it's not already there 
    if not name_rec.has_key('name_hash128'):
        name_rec['name_hash128'] = hash256_trunc128( name_rec['name'] )

    return True
253346
public String getString(Collection<ByteBuffer> names)
    {
        StringBuilder builder = new StringBuilder();
        for (ByteBuffer name : names)
        {
            builder.append(getString(name)).append(",");
        }
        return builder.toString();
    }
1323371
private String[] getAlternateNames(String name) {
    String oldName, altNames[] = null;
    DeprecatedKeyInfo keyInfo = deprecatedKeyMap.get(name);
    if (keyInfo == null) {
      altNames = (reverseDeprecatedKeyMap.get(name) != null) ?
                   new String [] {reverseDeprecatedKeyMap.get(name)} : null;
      if (altNames != null && altNames.length > 0) {
        //To help look for other new configs for this deprecated config
        keyInfo = deprecatedKeyMap.get(altNames[0]);
      }
    }
    if (keyInfo != null && keyInfo.newKeys.length > 0) {
      List<String> list = new ArrayList<String>();
      if (altNames != null) {
        list.addAll(Arrays.asList(altNames));
      }
      list.addAll(Arrays.asList(keyInfo.newKeys));
      altNames = list.toArray(new String[list.size()]);
    }
    return altNames;
  }
1001793
def read_name(self):
        """"""
        result = ''
        off = self.offset
        next = -1
        first = off

        while 1:
            len = ord(self.data[off])
            off += 1
            if len == 0:
                break
            t = len & 0xC0
            if t == 0x00:
                result = ''.join((result, self.read_utf(off, len) + '.'))
                off += len
            elif t == 0xC0:
                if next < 0:
                    next = off + 1
                off = ((len & 0x3F) << 8) | ord(self.data[off])
                if off >= first:
                    raise Exception(
                            "Bad domain name (circular) at " + str(off))
                first = off
            else:
                raise Exception("Bad domain name at " + str(off))

        if next >= 0:
            self.offset = next
        else:
            self.offset = off

        return result
623572
public static String getName(String datatypeKey)
    {
    	Datatype datatype = getDatatype(datatypeKey);
    	return datatype.getName();
    }
435567
public NameValue[] getNameValueArray(BaseMessageHeader header)
    {
        Object[][] mxString = header.getNameValueTree();
        NameValue[] rgNodes = new NameValue[10];
        rgNodes[0] = this;
        int i = 0;
        if (mxString != null)
        {
            for (; i < mxString.length; i++)
            {
                rgNodes[i + 1] = rgNodes[i].getNameValueNode((String)mxString[i][MessageConstants.NAME], mxString[i][MessageConstants.VALUE], false);
                if (rgNodes[i + 1] == null)
                    break;
            }
        }
        NameValue[] rgNodesNew = new NameValue[i + 1];
        for (int j = 0; j <= i; j++)
        {
            rgNodesNew[j] = rgNodes[j];
        }
        return rgNodesNew;
    }
1367790
protected static String getFileName(String file_name) {
    if (file_name == null) return "";
    file_name = file_name.trim();
    int iPos = 0;
    iPos = file_name.lastIndexOf("\\");
    if (iPos > -1) file_name = file_name.substring(iPos + 1);

    iPos = file_name.lastIndexOf("/");
    if (iPos > -1) file_name = file_name.substring(iPos + 1);

    iPos = file_name.lastIndexOf(File.separator);
    if (iPos > -1) file_name = file_name.substring(iPos + 1);

    return file_name;
  }
179197
private int getType(final String tok) {
		if (tok.startsWith("string")) {
			return STRING_TYPE;
		} else if (tok.startsWith("belong")) {
			return BELONG_TYPE;
		} else if (tok.equals("short")) {
			return SHORT_TYPE;
		} else if (tok.startsWith("lelong")) {
			return LELONG_TYPE;
		} else if (tok.startsWith("beshort")) {
			return BESHORT_TYPE;
		} else if (tok.startsWith("leshort")) {
			return LESHORT_TYPE;
		} else if (tok.equals("byte")) {
			return BYTE_TYPE;
		}

		return UNKNOWN_TYPE;
	}
1158031
def namedb_get_name(cur, name, current_block, include_expired=False, include_history=True, only_registered=True):
    

    if not include_expired:

        unexpired_fragment, unexpired_args = namedb_select_where_unexpired_names(current_block, only_registered=only_registered)
        select_query = "SELECT name_records.* FROM name_records JOIN namespaces ON name_records.namespace_id = namespaces.namespace_id " + \
                       "WHERE name = ? AND " + unexpired_fragment + ";"
        args = (name, ) + unexpired_args

    else:
        select_query = "SELECT * FROM name_records WHERE name = ?;"
        args = (name,)

    # log.debug(namedb_format_query(select_query, args))

    name_rows = namedb_query_execute( cur, select_query, args )
    name_row = name_rows.fetchone()
    if name_row is None:
        # no such name
        return None 

    name_rec = {}
    name_rec.update( name_row )
    
    if include_history:
        name_history = namedb_get_history( cur, name )
        name_rec['history'] = name_history

    return name_rec
1151439
private String readName() throws IOException, KriptonRuntimeException {
		if (position >= limit && !fillBuffer(1)) {
			checkRelaxed("name expected");
			return "";
		}

		int start = position;
		StringBuilder result = null;

		// read the first character
		char c = buffer[position];
		if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || c == ':' || c >= '\u00c0' // TODO:
																										// check
																										// the
																										// XML
																										// spec
				|| relaxed) {
			position++;
		} else {
			checkRelaxed("name expected");
			return "";
		}

		while (true) {
			/*
			 * Make sure we have at least a single character to read from the
			 * buffer. This mutates the buffer, so save the partial result to
			 * the slow path string builder first.
			 */
			if (position >= limit) {
				if (result == null) {
					result = new StringBuilder();
				}
				result.append(buffer, start, position - start);
				if (!fillBuffer(1)) {
					return result.toString();
				}
				start = position;
			}

			// read another character
			c = buffer[position];
			if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_' || c == '-' || c == ':' || c == '.' || c >= '\u00b7') { // TODO:
																																								// check
																																								// the
																																								// XML
																																								// spec
				position++;
				continue;
			}

			// we encountered a non-name character. done!
			if (result == null) {
				return stringPool.get(buffer, start, position - start);
			} else {
				result.append(buffer, start, position - start);
				return result.toString();
			}
		}
	}
331484
protected String extractFirstName(String name) {
    if (StringUtils.isBlank(name)) {
      return null;
    }
    
    int lastIndexOf = name.lastIndexOf(' ');
    
    if (lastIndexOf == -1)
      return null;
    else
      return name.substring(0, lastIndexOf);
  }
85780
public String getName(SmallMoleculeReference smr)
	{
		if (map.containsKey(smr)) return map.get(smr).getDisplayName();
		else return smr.getDisplayName();
	}
1130491
private <S extends Symbol> S nameToSymbol(ModuleSymbol module, String nameStr, Class<S> clazz) {
        Name name = names.fromString(nameStr);
        // First check cache.
        Symbol sym = (clazz == ClassSymbol.class)
                    ? syms.getClass(module, name)
                    : syms.lookupPackage(module, name);

        try {
            if (sym == null)
                sym = javaCompiler.resolveIdent(module, nameStr);

            sym.complete();

            return (sym.kind != ERR &&
                    sym.exists() &&
                    clazz.isInstance(sym) &&
                    name.equals(sym.getQualifiedName()))
                ? clazz.cast(sym)
                : null;
        } catch (CompletionFailure e) {
            return null;
        }
    }
1244169
public static MsgPhrase get(final String _name)
        throws EFapsException
    {
        final Cache<String, MsgPhrase> cache = InfinispanCache.get().<String, MsgPhrase>getCache(MsgPhrase.NAMECACHE);
        if (!cache.containsKey(_name)) {
            MsgPhrase.loadMsgPhrase(_name);
        }
        return cache.get(_name);
    }
226917
public T get(final String _name)
    {
        return getCache4Name() == null ? null : getCache4Name().get(_name);
    }