/*
Returns the location of iedriverserver or "" if it can not be determined.
972147
private String getBinaryPath() {
        String location = System.getProperty(SeLionConstants.WEBDRIVER_IE_DRIVER_PROPERTY,
                Config.getConfigProperty(ConfigProperty.SELENIUM_IEDRIVER_PATH));
        return location;
    }
385136
private Coordinate getOrigin(HumanInputEvent<?> event) {
		// Get the original location for the lastly selected index:
		if (lastSelection != null) {
			try {
				return service.getIndexService().getVertex(service.getGeometry(), lastSelection);
			} catch (GeometryIndexNotFoundException e) {
			}
		}

		// Backup plan: mouse location.
		return getLocation(event, RenderSpace.SCREEN);
	}
1199439
function getHost(url) {
        var uri = window.document.createElement('a');

        if (isAbsolute(url) || startWithSlash(url)) {

            uri.href = url;

            return (uri.protocol || window.location.protocol) + '//' + (uri.host || window.location.host);

        }
    }
212377
static String saveGetLocation(WebDriver driver) {
        logger.entering(driver);
        String location = "n/a";
        try {
            if (driver != null) {
                location = driver.getCurrentUrl();
            }
        } catch (Exception exception) {
            logger.log(Level.FINER, "Current location couldn't be retrieved by getCurrentUrl(). This can be SAFELY "
                    + "IGNORED if testing a non-web mobile application. Reason: ", exception);
        }
        logger.exiting(location);
        return location;
    }
2968
def getLoggingLocation(self):
		""""""
		if sys.platform == "win32":
			modulePath = os.path.realpath(__file__)
			modulePath = modulePath[:modulePath.rfind("/")]
			return modulePath
		else:
			return "/tmp"
		return ""
8819
public String getRack(InetAddress endpoint)
    {
        String[] info = getEndpointInfo(endpoint);
        assert info != null : "No location defined for endpoint " + endpoint;
        return info[1];
    }
466529
function getDriverInstance() {

    var driver;

    switch (browserName || '') {

        case 'firefox': {
            driver = new FireFoxDriver();
        }
            break;

        case 'phantomjs': {
            driver = new PhantomJSDriver();
        }
            break;

        case 'electron': {
            driver = new ElectronDriver();
        }
            break;

        case 'chrome': {
            driver = new ChromeDriver();
        }
            break;

        // try to load from file
        default: {
            var driverFileName = path.resolve(process.cwd(), browserName);

            if (!fs.isFileSync(driverFileName)) {
                throw new Error('Could not find driver file: ' + driverFileName);
            }

            driver = require(driverFileName)();
        }
    }

    return driver;
}
1019927
int getPort() {
        LOGGER.entering();
        int val = -1;

        InstanceType type = getType();
        if (commands.contains(PORT_ARG)) {
            val = Integer.parseInt(commands.get(commands.indexOf(PORT_ARG) + 1));
            LOGGER.exiting(val);
            return val;
        }

        try {
            if (type.equals(InstanceType.SELENIUM_NODE) || type.equals(InstanceType.SELENIUM_HUB)) {
                val = getSeleniumConfigAsJsonObject().get("port").getAsInt();
            }
        } catch (JsonParseException | NullPointerException e) {
            // ignore
        }

        // last ditch effort
        val = (val != -1) ? val : 4444;
        LOGGER.exiting(val);
        return val;
    }
824917
function getControllerDir(isInstall) {
    // Find the js-controller location
    const possibilities = ["iobroker.js-controller", "ioBroker.js-controller"];
    let controllerPath;
    for (const pkg of possibilities) {
        try {
            const possiblePath = require.resolve(pkg);
            if (fs.existsSync(possiblePath)) {
                controllerPath = possiblePath;
                break;
            }
        }
        catch (_a) {
            /* not found */
        }
    }
    // Apparently, checking vs null/undefined may miss the odd case of controllerPath being ""
    // Thus we check for falsyness, which includes failing on an empty path
    if (!controllerPath) {
        if (!isInstall) {
            console.log("Cannot find js-controller");
            return process.exit(10);
        }
        else {
            return process.exit();
        }
    }
    // we found the controller
    return path.dirname(controllerPath);
}
82424
function(windowOverride) {
      var loc = windowOverride ? windowOverride.location : window.location;
      var match = loc.href.match(/#(.*)$/);
      return match ? match[1] : '';
    }
465108
@Nullable
  protected String locate(String scriptAddress, String name) {
    String canonicalizedPath = canonicalizePath(scriptAddress, name);

    String normalizedPath = canonicalizedPath;
    if (ModuleLoader.isAmbiguousIdentifier(canonicalizedPath)) {
      normalizedPath = ModuleLoader.MODULE_SLASH + canonicalizedPath;
    }

    // First check to see if the module is known with it's provided path
    if (modulePaths.contains(normalizedPath)) {
      return canonicalizedPath;
    }

    // Check for the module beneath each of the module roots
    for (String rootPath : moduleRootPaths) {
      String modulePath = rootPath + normalizedPath;

      // Since there might be code that relying on whether the path has a leading slash or not,
      // honor the state it was provided in. In an ideal world this would always be normalized
      // to contain a leading slash.
      if (modulePaths.contains(modulePath)) {
        return canonicalizedPath;
      }
    }

    return null;
  }
187058
ExecutionLocation getLocation(ParserRuleContext object) {
    Token start = object.getStart();
    return new ExecutionLocation(currentScope.declaringEnvironment.path, start.getLine(), start.getCharPositionInLine() + 1);
  }
1188106
protected String getLocationDesc()
    {
        Location loc = getLocation();
        return (loc == null) ? null : loc.toString();
    }
1176594
function getConfigFromBrowser() {
  var defaultLocation = {
    port: '80',
    hostname: 'localhost',
    protocol: 'http:'
  };

  var wLocation = (global.location)
    ? global.location
    : defaultLocation;

  var location = {
    port: wLocation.port,
    host: wLocation.protocol + '//' + wLocation.hostname
  };

  var config = {
    port: location.port,
    host: location.host,
    errorHandlers: []
  };

  return config;
}
826617
function getHomePath () {
  if (process.platform === 'win32') {
    return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || process.env.HOME
  } else {
    return process.env.HOME
  }
}
1324869
public Location getExceptionThrowerLocation(Edge exceptionEdge) {
        if (!exceptionEdge.isExceptionEdge()) {
            throw new IllegalArgumentException();
        }

        InstructionHandle handle = exceptionEdge.getSource().getExceptionThrower();
        if (handle == null) {
            throw new IllegalStateException();
        }

        BasicBlock basicBlock = (handle.getInstruction() instanceof ATHROW) ? exceptionEdge.getSource()
                : getSuccessorWithEdgeType(exceptionEdge.getSource(), EdgeTypes.FALL_THROUGH_EDGE);

        if (basicBlock == null && removedEdgeList != null) {
            // The fall-through edge might have been removed during
            // CFG pruning. Look for it in the removed edge list.
            for (Edge removedEdge : removedEdgeList) {
                if (removedEdge.getType() == EdgeTypes.FALL_THROUGH_EDGE
                        && removedEdge.getSource() == exceptionEdge.getSource()) {
                    basicBlock = removedEdge.getTarget();
                    break;
                }
            }
        }

        if (basicBlock == null) {
            throw new IllegalStateException("No basic block for thrower " + handle + " in " + this.methodGen.getClassName() + "."
                    + this.methodName + " : " + this.methodGen.getSignature());
        }

        return new Location(handle, basicBlock);
    }
513863
public Location getLocation(String str) {
        InetAddress addr;
        try {
            addr = InetAddress.getByName(str);
        } catch (UnknownHostException e) {
            return null;
        }

        return getLocation(addr);
    }