Get a Map of process name/alias to process config name
A config may be reused under multiple aliases

@param nameList a list of process names conforming to the processNameListPattern
11692
public static Map<String,String> getNamesWithAliases(String nameList) {
        String[] names = nameList.split(",");
        Map<String,String> results = new LinkedHashMap<>();  //retain ordering / determinism
        for ( String p : names) {
            String configName = p.trim();

            if ( configName.length() > 0) {
                Matcher matcher = nameWithAlias.matcher(configName);
                if (matcher.matches()) {
                    results.put(matcher.group(2), matcher.group(1));
                } else {
                    results.put(configName, configName);
                }
            }
        }
        return results;
    }
199142
public Collection<? extends NameClassPair> listInstances(NamingConstants.JavaColonNamespace namespace, String contextName) throws NamingException {
        if (namespace == NamingConstants.JavaColonNamespace.COMP) {
            return listInstances(compLock, compBindings, contextName);
        }
        if (namespace == NamingConstants.JavaColonNamespace.COMP_ENV) {
            return listInstances(compLock, compEnvBindings, contextName);
        }
        if (namespace == this.namespace) {
            return listInstances(nonCompEnvLock, nonCompBindings, contextName);
        }
        return Collections.emptyList();
    }
412558
public void setProgramName(String name, String... aliases) {
        programName = new ProgramName(name, Arrays.asList(aliases));
    }
633880
private void addAlternateNamedFacesConfig(Container moduleContainer, ArrayList<String> classList) {
        try {
            WebApp webapp = moduleContainer.adapt(WebApp.class);

            //If null, assume there was no web.xml, so no need to look for ContextParams in it.
            if (webapp == null) {
                return;
            }

            List<ParamValue> params = webapp.getContextParams();
            String configNames = null;
            for (ParamValue param : params) {
                if (param.getName().equals(FACES_CONFIG_NAMES)) {
                    configNames = param.getValue();
                    break;
                }
            }

            //If we didn't find the param, then bail out
            if (configNames == null)
                return;

            //Treat value as a comma delimited list of file names
            StringTokenizer st = new StringTokenizer(configNames, ",");
            while (st.hasMoreTokens()) {
                addConfigFileBeans(moduleContainer.getEntry(st.nextToken()), classList);
            }

        } catch (UnableToAdaptException e) {
            if (log.isLoggable(Level.FINE)) {
                log.logp(Level.FINE, CLASS_NAME, "addAlternateNamedFacesConfig", "failed to adapt conatiner to WebApp", e);
            }
        }
    }
265967
@Override
  public List<NameAssignment> lookup(final Iterable<Identifier> identifiers) {
    LOG.log(Level.FINE, "identifiers");
    final List<NameAssignment> nas = new ArrayList<>();
    for (final Identifier id : identifiers) {
      final InetSocketAddress addr = idToAddrMap.get(id);
      LOG.log(Level.FINEST, "id : {0} addr: {1}", new Object[]{id, addr});
      if (addr != null) {
        nas.add(new NameAssignmentTuple(id, addr));
      }
    }
    return nas;
  }
678597
public static List<AliasedDiscoveryConfig<?>> aliasedDiscoveryConfigsFrom(WanPublisherConfig config) {
        return asList(config.getAwsConfig(), config.getGcpConfig(), config.getAzureConfig(), config.getKubernetesConfig(),
                config.getEurekaConfig());
    }
213958
public static List<InetSocketAddress> getAddresses(Configuration conf,
      Collection<String> serviceIds, String defaultAddress, String... keys) {
    Collection<String> nameserviceIds = getNameServiceIds(conf);
    List<InetSocketAddress> isas = new ArrayList<InetSocketAddress>();

    // Configuration with a single namenode
    if (nameserviceIds == null || nameserviceIds.isEmpty()) {
      String address = getConfValue(defaultAddress, null, conf, keys);
      if (address == null) {
        return null;
      }
      isas.add(NetUtils.createSocketAddr(address));
    } else {
      // Get the namenodes for all the configured nameServiceIds
      for (String nameserviceId : nameserviceIds) {
        String address = getConfValue(null, nameserviceId, conf, keys);
        if (address == null) {
          return null;
        }
        isas.add(NetUtils.createSocketAddr(address));
      }
    }
    return isas;
  }
1047524
protected void processAsPropertyNames(QualifiedName name, NameAcceptor acceptor) {
		String nameAsPropertyName = tryGetAsPropertyName(name.toString());
		if (nameAsPropertyName != null) {
			if (featureCall == null || featureCall instanceof XAssignment) {
				String aliasedSetter = "set" + nameAsPropertyName;
				acceptor.accept(aliasedSetter, 2);
			}
			if (!(featureCall instanceof XAssignment)) {
				if (featureCall == null || !getFeatureCall().isExplicitOperationCallOrBuilderSyntax()) {
					String aliasedGetter = "get" + nameAsPropertyName;
					acceptor.accept(aliasedGetter, 2);
					String aliasedBooleanGetter = "is" + nameAsPropertyName;
					acceptor.accept(aliasedBooleanGetter, 2);
				}
			}
		}
	}
1338704
public synchronized Properties getProcessProperties(final String processName) {
        final NamedProcess namedProcess = processes.get(processName);
        return namedProcess == null ? null : namedProcess.getProperties();
    }
1251861
@Override
    public Collection<? extends NameClassPair> listRemoteInstances(JavaColonNamespace namespace, String nameInContext) throws NamingException {
        return listInstances(namespace, nameInContext);
    }
280280
private List<String> aliasHeader(List<Object> headerList) {
		final int size = headerList.size();
		final ArrayList<String> result = new ArrayList<>(size);
		if (CollUtil.isEmpty(headerList)) {
			return result;
		}

		for(int i = 0; i < size; i++) {
			result.add(aliasHeader(headerList.get(i), i));
		}
		return result;
	}
1021856
public Map<String, Namespace> getNamespaceMap() {
        final Map<String, Namespace> ret = new HashMap<String, Namespace>();
        if (namespaceGroup == null) {
            return ret;
        }

        final List<Namespace> namespaces = namespaceGroup.getNamespaces();
        if (hasItems(namespaces)) {
            for (final Namespace ns : namespaces)
                ret.put(ns.getPrefix(), ns);
        }

        final String defns = namespaceGroup.getDefaultResourceLocation();
        if (defns != null) {
            Namespace ns = new Namespace(DEFAULT_NAMESPACE_PREFIX, defns);
            ret.put(DEFAULT_NAMESPACE_PREFIX, ns);
        }

        return ret;
    }
314043
public static Map<String, Double> getComponentCpuMapConfig(TopologyAPI.Topology topology)
      throws RuntimeException {
    Map<String, String> configMap =
        getComponentConfigMap(topology, Config.TOPOLOGY_COMPONENT_CPUMAP);
    Map<String, Double> cpuMap = new HashMap<>();

    for (Map.Entry<String, String> entry : configMap.entrySet()) {
      Double requiredCpu = Double.parseDouble(entry.getValue());
      cpuMap.put(entry.getKey(), requiredCpu);
    }
    return cpuMap;
  }
117174
private List<ResultMap> getResultMap(String namespace, Class<?> clazz, Configuration conf) {
    String dynamicResultMapId = namespace + "." + GENERATE_RESULT_MAP_NAME;
    ResultMap dynamicResultMap = buildResultMap(dynamicResultMapId, clazz, conf);
    List<ResultMap> resultMaps = Lists.newArrayList();
    resultMaps.add(dynamicResultMap);
    return Collections.unmodifiableList(resultMaps);
  }
59433
def retrieve_import_alias_mapping(names_list):
    """"""
    import_alias_names = dict()

    for alias in names_list:
        if alias.asname:
            import_alias_names[alias.asname] = alias.name
    return import_alias_names
1051589
private String processName(String name) {
        String prefix = "";

        if (this.type != null) {
            prefix = this.type.getName() + ".";
        }

        return prefix + name;
    }
48384
private static List<String> toConfigurationStringList(final Configuration c) {
    final ConfigurationImpl conf = (ConfigurationImpl) c;
    final List<String> l = new ArrayList<>();
    for (final ClassNode<?> opt : conf.getBoundImplementations()) {
      l.add(opt.getFullName()
          + '='
          + escape(conf.getBoundImplementation(opt).getFullName()));
    }
    for (final ClassNode<?> opt : conf.getBoundConstructors()) {
      l.add(opt.getFullName()
          + '='
          + escape(conf.getBoundConstructor(opt).getFullName()));
    }
    for (final NamedParameterNode<?> opt : conf.getNamedParameters()) {
      l.add(opt.getFullName()
          + '='
          + escape(conf.getNamedParameter(opt)));
    }
    for (final ClassNode<?> cn : conf.getLegacyConstructors()) {
      final StringBuilder sb = new StringBuilder();
      join(sb, "-", conf.getLegacyConstructor(cn).getArgs());
      l.add(cn.getFullName()
          + escape('='
              + ConfigurationBuilderImpl.INIT
              + '('
              + sb.toString()
              + ')'
      ));
    }
    for (final NamedParameterNode<Set<?>> key : conf.getBoundSets()) {
      for (final Object value : conf.getBoundSet(key)) {
        final String val;
        if (value instanceof String) {
          val = (String) value;
        } else if (value instanceof Node) {
          val = ((Node) value).getFullName();
        } else {
          throw new IllegalStateException("The value bound to a given NamedParameterNode "
                  + key + " is neither the set of class hierarchy nodes nor strings.");
        }
        l.add(key.getFullName() + '=' + escape(val));
      }
    }
    return l;
  }