Returns the bundle module name for a string substitution
@param {string} nameWithConditional The module identifier including the condition
@param {string} variation A match of the glob pattern
@return {string} The bundle module name
347787
function getModuleName(nameWithConditional, variation) {
			var modName;
			var conditionIndex = nameWithConditional.search(conditionalRegEx);

			// look for any "/" after the condition
			var lastSlashIndex = nameWithConditional.indexOf("/",
				nameWithConditional.indexOf("}"));

			// substitution of a folder name
			if (lastSlashIndex !== -1) {
				modName = nameWithConditional.substr(0, conditionIndex) + variation;
			}
			else {
				modName = nameWithConditional.replace(conditionalRegEx, variation);
			}

			return modName;
		}
840424
function generateBundleName(name, modules, conditionValueOrVariationObject) {
    // first check if the given modules already matches an existing bundle
    let existingBundleName;
    for (const bundleName of Object.keys(bundles)) {
      const bundleModules = bundles[bundleName].modules;

      if (
        containsModules(modules, bundleModules) &&
        containsModules(bundleModules, modules)
      ) {
        existingBundleName = bundleName;
      }
    }
    if (existingBundleName) {
      return existingBundleName;
    }

    let shortName = name.split('/').pop();
    const dotIndex = shortName.lastIndexOf('.');
    if (dotIndex > 0) {
      shortName = shortName.substr(0, dotIndex);
    }

    let bundleName = shortName.replace(/[ .]/g, '').toLowerCase();
    if (conditionValueOrVariationObject) {
      if (typeof conditionValueOrVariationObject === 'string') {
        bundleName += `-${conditionValueOrVariationObject}`;
      } else {
        for (const condition of Object.keys(conditionValueOrVariationObject)) {
          bundleName += `-${conditionValueOrVariationObject[condition]}`;
        }
      }
    }

    let i;
    if (bundles[bundleName]) {
      i = 1;
      while (bundles[`${bundleName}-${i}`]) {
        i += 1;
      }
    }
    return bundleName + (i ? `-${i}` : '');
  }
924473
function getNpmPackage(name, component) {
			var pkg = findPackage(name, component);
			if (!pkg) return null;

			var mainjs = path.join(pkg, 'lib/main.js');
			if (!fs.existsSync(mainjs)) return null;

			return requirePackage(pkg, mainjs);
		}
186083
function getModuleConfig(nameOrPath,modules) {
    for (var i = 0; i < modules.length; i++) {
        var config = modules[i];
        if (config.options && (config.options.directory === nameOrPath || config.name === nameOrPath)) {
            return config;
        }
    }
    return null;
}
424372
function getBundleIdentifier (projectObject) {
    var packageName = projectObject.getPackageName();
    var bundleIdentifier = packageName;

    var variables = packageName.match(/\$\((\w+)\)/); // match $(VARIABLE), if any
    if (variables && variables.length >= 2) {
        bundleIdentifier = projectObject.xcode.getBuildProperty(variables[1]);
    }

    return bundleIdentifier;
}
618862
public Map<String, VariantSet> getCustomBundleVariantSets(String bundleName) {
		Map<String, VariantSet> variantSets = new HashMap<>();

		StringTokenizer tk = new StringTokenizer(
				getCustomBundleProperty(bundleName, PropertiesBundleConstant.BUNDLE_FACTORY_CUSTOM_VARIANTS, ""), ";");
		while (tk.hasMoreTokens()) {
			String[] mapEntry = tk.nextToken().trim().split(":");

			String type = mapEntry[0];
			String defaultVariant = mapEntry[1];
			String values = mapEntry[2];
			String[] variantsArray = StringUtils.split(values, ",");
			List<String> variants = new ArrayList<>();
			variants.addAll(Arrays.asList(variantsArray));

			VariantSet variantSet = new VariantSet(type, defaultVariant, variants);
			variantSets.put(type, variantSet);
		}
		return variantSets;
	}
88514
function getSplitModule(content, constraints) {
    var src = '', lastIdx = 0, currentNamespace;
    content.replace(/\/\*\*\* @namespace (\w+) \*\*\*\/\n|$/g, function(match, nextNamespace, idx) {
      if (!currentNamespace || constraints[currentNamespace]) {
        src += content.slice(lastIdx, idx);
      }
      currentNamespace = (nextNamespace || '').toLowerCase();
      lastIdx = idx;
    });
    return src;
  }
178930
private void checkBundleName(String bundleName, Map<String, JoinableResourceBundle> bundleMap) {
		if (!JAWR_ROOT_MODULE_NAME.equals(bundleName)) {
			boolean moduleExist = bundleMap.get(bundleName) != null;
			if (!moduleExist) {
				throw new BundlingProcessException("The bundle name '" + bundleName
						+ "' defined in 'jawr.js.closure.modules' is not defined in the configuration. Please check your configuration.");
			}
		}
	}
199003
function (moduleNamePlusExt) {
              var ext,
                index = moduleNamePlusExt.lastIndexOf("."),
                segment = moduleNamePlusExt.split("/")[0],
                isRelative = segment === "." || segment === "..";

              //Have a file extension alias, and it is not the
              //dots from a relative path.
              if (index !== -1 && (!isRelative || index > 1)) {
                ext = moduleNamePlusExt.substring(
                  index,
                  moduleNamePlusExt.length
                );
                moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
              }

              return context.nameToUrl(
                normalize(moduleNamePlusExt, relMap && relMap.id, true),
                ext,
                true
              );
            }
1070618
private String parsePackageName(String pkgname) {
        int index = -1;
        for (int j = 0; j < MAX_CONSTANT_VALUE_INDEX_LENGTH; j++) {
            index = pkgname.indexOf(".", index + 1);
        }
        if (index != -1) {
            pkgname = pkgname.substring(0, index);
        }
        return pkgname;
    }
268677
function stringify (parsedPackageName) {
  const { scope, version } = parsedPackageName
  let name = parsedPackageName.name

  if (scope) {
    name = `@${scope}/${name}`
  }

  if (version) {
    name = `${name}@${version}`
  }

  return name
}
720495
def qualified_name(self):
        ''''''
        return '{0}.{1}#{2}'.format(self.module.name, self.interface.name, self.name)
1010105
function file2moduleName(filePath) {
  return filePath
      .replace(/\\/g, '/')
      // module name should be relative to `modules` and `tools` folder
      .replace(/.*\/modules\//, '')
      //  and 'dist' folder
      .replace(/.*\/dist\/js\/dev\/es5\//, '')
      // module name should not include `lib`, `web` folders
      // as they are wrapper packages for dart
      .replace(/\/web\//, '/')
      .replace(/\/lib\//, '/')
      // module name should not have a suffix
      .replace(/\.\w*$/, '');
}
336069
function variants(name, initial) {
  const map = initial ? initStars : bubbleStars;
  if (map[name]) return map[name];

  const parts = name.split('.');
  const result = [];
  let base = false;

  // initial events the implicit namespace of 'this'
  if (initial) {
    parts.unshift('this');
    base = true;
  }

  // use max - 1 bits as a bitmap to pick a part or a *
  // need to skip the full star case if the namespace is synthetic
  const max = Math.pow(2, parts.length) - (initial ? 1 : 0);
  for (let i = 0; i < max; i++) {
    const join = [];
    for (let j = 0; j < parts.length; j++) {
      join.push(1 & (i >> j) ? '*' : parts[j]);
    }
    result.unshift(join.join('.'));
  }

  if (base) {
    // include non-this-namespaced versions
    if (parts.length > 2) {
      result.push.apply(result, variants(name, false));
    } else {
      result.push('*');
      result.push(name);
    }
  }

  map[name] = result;
  return result;
}
645239
private Map<String, String> getVariantMap(ResourceBundlesHandler bundlesHandler, String contextPath,
			String bundlePath) {

		JoinableResourceBundle bundle = bundlesHandler.resolveBundleForPath(bundlePath);
		Set<String> variantTypes = bundle.getVariants().keySet();

		String variantKey = getVariantKey(contextPath);
		String[] variantValues = new String[0];
		if (variantKey.length() > 0) {
			if (variantKey.length() == 1) {
				variantValues = new String[] { "", "" };
			} else {
				variantValues = variantKey.split(String.valueOf(JawrConstant.VARIANT_SEPARATOR_CHAR));
			}
		}

		Map<String, String> variants = new HashMap<>();
		if (variantTypes.size() != variantValues.length) {
			throw new BundlingProcessException("For the resource '" + contextPath
					+ "', the number variant types for the bundle don't match the variant values.");
		}
		int i = 0;
		for (String variantType : variantTypes) {
			variants.put(variantType, variantValues[i++]);
		}
		return variants;
	}
151289
private String generateBundleNameFromBundleId(String bundleId) {
		String bundleName = bundleId;
		if (bundleName.startsWith("/")) {
			bundleName = bundleName.substring(1);
		}
		int idxExtension = FileNameUtils.indexOfExtension(bundleName);
		if (idxExtension != -1) {
			bundleName = bundleName.substring(0, idxExtension);
		}
		return bundleName.replaceAll("(/|\\.|:)", "_");
	}
167285
function getExternalModuleNameFromPath(host, fileName) {
        var getCanonicalFileName = function (f) { return host.getCanonicalFileName(f); };
        var dir = ts.toPath(host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName);
        var filePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory());
        var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false);
        return ts.removeFileExtension(relativePath);
    }