Parse the supplemental territory aliases map.
767448
private void parseTerritoryAliases(JsonObject root) {
    JsonObject node = resolve(root, "supplemental", "metadata", "alias", "territoryAlias");
    for (String tag : objectKeys(node)) {
      JsonObject value = node.getAsJsonObject(tag);
      String replacement = string(value, "_replacement");
      territoryAliases.put(tag, replacement);
    }
  }
131532
protected function parseMappings()
    {
        $this->mappedAttributes = [];

        foreach ($this->getMaps() as $attribute => $mapping) {
            if (is_array($mapping)) {
                $this->parseImplicitMapping($mapping, $attribute);
            } else {
                $this->mappedAttributes[$attribute] = $mapping;
            }
        }
    }
1197005
private void loadMappings() {

		for (int i = 0; i < mappings.length; i++) {

			String[] pair = mappings[i].split(";");
			if (pair.length < 2) {
				try {
					throw new AnnotatorConfigurationException();
				} catch (AnnotatorConfigurationException e) {
					LOGGER.error("[OpenNLP Parser: ]" + e.getMessage());
					e.printStackTrace();
				}
			} else {
				String consTag = pair[0];
				String casTag = pair[1];
				mapTable.put(consTag, casTag);
			}
		}

	}
230621
function getNames (resourceType) {
  const aliases = [resourceType];
  if (resourceAliases[resourceType]) {
    return aliases.concat(resourceAliases[resourceType]);
  }
  return alias(resourceType);
}
417301
private static List<UriMapping> parseMappings(Properties props) {
        List<UriMapping> mappings = new ArrayList<>();

        Collection<String> mappingsParam = Parameters.MAPPINGS.getValue(props);
        for (String mappingParam : mappingsParam) {
            mappings.add(UriMapping.create(mappingParam));
        }

        return mappings;
    }
540968
def get_bot_mapping(self):
        """"""
        bot = self.context.bot
        mapping = {
            cog: cog.get_commands()
            for cog in bot.cogs.values()
        }
        mapping[None] = [c for c in bot.all_commands.values() if c.cog is None]
        return mapping
668808
def get_aliases(self, includename=True):
        
        # empty list if doesnt exist
        alias_quanta = self.get(self._KEYS.ALIAS, [])
        aliases = [aq[QUANTITY.VALUE] for aq in alias_quanta]
        if includename and self[self._KEYS.NAME] not in aliases:
            aliases = [self[self._KEYS.NAME]] + aliases
        return aliases
249771
private void parseLanguageAliases(JsonObject root) {
    JsonObject node = resolve(root, "supplemental", "metadata", "alias", "languageAlias");
    for (String tag : objectKeys(node)) {
      JsonObject value = node.getAsJsonObject(tag);
      String replacement = string(value, "_replacement");
      languageAliases.put(tag, replacement);
    }
  }
1168312
function _mapInExtensions(&$root, $path, $asn1)
    {
        $extensions = &$this->_subArray($root, $path);

        if (is_array($extensions)) {
            for ($i = 0; $i < count($extensions); $i++) {
                $id = $extensions[$i]['extnId'];
                $value = &$extensions[$i]['extnValue'];
                $value = base64_decode($value);
                $decoded = $asn1->decodeBER($value);
                /* [extnValue] contains the DER encoding of an ASN.1 value
                   corresponding to the extension type identified by extnID */
                $map = $this->_getMapping($id);
                if (!is_bool($map)) {
                    $mapped = $asn1->asn1map($decoded[0], $map);
                    $value = $mapped === false ? $decoded[0] : $mapped;

                    if ($id == 'id-ce-certificatePolicies') {
                        for ($j = 0; $j < count($value); $j++) {
                            if (!isset($value[$j]['policyQualifiers'])) {
                                continue;
                            }
                            for ($k = 0; $k < count($value[$j]['policyQualifiers']); $k++) {
                                $subid = $value[$j]['policyQualifiers'][$k]['policyQualifierId'];
                                $map = $this->_getMapping($subid);
                                $subvalue = &$value[$j]['policyQualifiers'][$k]['qualifier'];
                                if ($map !== false) {
                                    $decoded = $asn1->decodeBER($subvalue);
                                    $mapped = $asn1->asn1map($decoded[0], $map);
                                    $subvalue = $mapped === false ? $decoded[0] : $mapped;
                                }
                            }
                        }
                    }
                } elseif ($map) {
                    $value = base64_encode($value);
                }
            }
        }
    }
15461
def _format_name_map(self, lonc, latc):
        '''  '''

        return '_'.join(['WAC', 'GLOBAL'] +
                        ['E' + latc + lonc, "{0:0>3}".format(self.ppd) + 'P'])
1159627
function getAliases(actionObj, defaultVerb, defaultPath, hasAlias) {
    if (hasAlias === false) return [];
    if (actionObj.aliases.length !== 0) {
      return actionObj.aliases; // some custom aliases.
    }
    var rootPath = actionObj.rootPath;
    if (rootPath.charAt(0) !== '/') rootPath = '/' + rootPath;
    if (rootPath.charAt(rootPath.length - 1) === '/') rootPath = rootPath.substr(0, rootPath.length - 1);
    rootPath += defaultPath;
    return [[defaultVerb, rootPath]];
  }
1122296
private void parseTimeZoneAliases(JsonObject root) {
    JsonObject node = resolve(root, "supplemental", "metadata", "alias", "zoneAlias");
    parseTimeZoneAlias(node, Collections.emptyList());
  }
1321290
def p_alias(self, p):
        """"""
        if p[1] == 'alias':
            has_annotations = len(p) > 6 and p[7] is not None
            doc = p[8] if len(p) > 6 else None
            p[0] = AstAlias(
                self.path, p.lineno(1), p.lexpos(1), p[2], p[4], doc)
            if has_annotations:
                p[0].set_annotations(p[7])
        else:
            raise ValueError('Expected alias keyword')
158359
def _create_mappings(self, spec):
        
        ret = dict(zip(set(spec.fields), set(spec.fields)))
        ret.update(dict([(n, s.alias) for n, s in spec.fields.items() if s.alias]))
        return ret
350189
def filterMapNames(regexText,  records=getIndex(), excludeRegex=False, closestMatch=True):
    """"""
    bestScr = 99999 # a big enough number to not be a valid file system path
    regex = re.compile(regexText, flags=re.IGNORECASE)
    ret = []
    if excludeRegex: # match only records that do NOT contain regex
        if regexText and closestMatch: # then maps with fewer characters are better matches
            for m in list(records):
                if re.search(regex, m.name): continue # map must NOT contain specified phrase
                score = len(m.name) # the map with the smallest map name means it has the largets matching character percentage
                if score == bestScr:
                    bestScr = score
                    ret.append(m)
                elif score <  bestScr: # new set of best maps
                    bestScr = score
                    ret = [m]
        else: # all maps that match regex are included
            for m in list(records):
                if re.search(regex, m.name): continue # map must NOT contain specified phrase
                ret.append(m) # any mapname containing regex matches
    else: # only match records that contain regex
        if regexText and closestMatch: # then maps with fewer characters are better matches
            for m in records:
                if not re.search(regex, m.name): continue # map must contain specified phrase if excludeRegex==True
                score = len(m.name) # the map with the smallest map name means it has the largets matching character percentage
                if score == bestScr:
                    bestScr = score
                    ret.append(m)
                elif score <  bestScr: # new group of best maps
                    bestScr = score
                    ret = [m]
        else: # all maps that match regex are included
            for m in records:
                if not re.search(regex, m.name): continue # map must contain specified phrase if excludeRegex==True
                ret.append(m) # any mapname containing regex matches
    return ret
68658
def _get_canonical_map(self):
        
        cacheattr = "_token2canonical"
        if not hasattr(self, cacheattr):
            # Get the list of commands and their aliases, if any.
            token2canonical = {}
            cmd2funcname = {}  # use a dict to strip duplicates
            for attr in self.get_names():
                if attr.startswith("do_"): cmdname = attr[3:]
                elif attr.startswith("_do_"): cmdname = attr[4:]
                else:
                    continue
                cmd2funcname[cmdname] = attr
                token2canonical[cmdname] = cmdname
            for cmdname, funcname in cmd2funcname.items():  # add aliases
                func = getattr(self, funcname)
                aliases = getattr(func, "aliases", [])
                for alias in aliases:
                    if alias in cmd2funcname:
                        import warnings
                        warnings.warn("'%s' alias for '%s' command conflicts "
                                      "with '%s' handler" %
                                      (alias, cmdname, cmd2funcname[alias]))
                        continue
                    token2canonical[alias] = cmdname
            setattr(self, cacheattr, token2canonical)
        return getattr(self, cacheattr)
493562
private Map<String, String> parseMap() {
        final Map<String, String> map = new HashMap<>();
        for (String pair : browserInput.split("&")) {
            String[] kv = pair.split("=");
            map.put(kv[0], kv[1]);
        }
        return map;
    }