Uses androids android.util.Patterns.WEB_URL to check if an url is valid.

@param url Address to check
@return true if the <code>url</code> is a valid web address.
765434
public final static boolean isValidURL(String url) {
        if (url == null) {
            return false;
        } else {
            return Patterns.WEB_URL.matcher(url).matches();
        }
    }
1014450
@Pure
	@Inline(value = "URISchemeType.JAR.isURL($1)", imported = {URISchemeType.class})
	public static boolean isJarURL(URL url) {
		return URISchemeType.JAR.isURL(url);
	}
552698
public static boolean isJarURL(URL url) {
        String protocol = url.getProtocol();
        return (URL_PROTOCOL_JAR.equals(protocol) || URL_PROTOCOL_ZIP.equals(protocol) ||
                URL_PROTOCOL_VFSZIP.equals(protocol) || URL_PROTOCOL_WSJAR.equals(protocol));
    }
169540
protected boolean validateFixedUrl(final SpecNode specNode, final Set<String> processedFixedUrls) {
        boolean valid = true;

        if (!ProcessorConstants.VALID_FIXED_URL_PATTERN.matcher(specNode.getFixedUrl()).matches()) {
            log.error(format(ProcessorConstants.ERROR_FIXED_URL_NOT_VALID, specNode.getLineNumber(), specNode.getText()));
            valid = false;
        } else if (processedFixedUrls.contains(specNode.getFixedUrl())) {
            log.error(format(ProcessorConstants.ERROR_FIXED_URL_NOT_UNIQUE, specNode.getLineNumber(), specNode.getFixedUrl(),
                    specNode.getText()));
            valid = false;
        }

        return valid;
    }
203817
public static boolean isValid(final String value) {
        if (value == null) {
            return true;
        }
        if (value.length() == 0) {
            return false;
        }
        try {
            InternetAddress.parse(value, false);
            return true;
        } catch (final AddressException ex) {
            return false;
        }
    }
1238305
public static boolean isValidEmailAddress(final String email) {
    if (email == null) {
      return false;
    }

    boolean result = true;
    try {
      final InternetAddress emailAddr = new InternetAddress(email);
      emailAddr.validate();
    } catch (final AddressException ex) {
      result = false;
    }
    return result;
  }
599263
protected boolean excluded(String url) {
        for (final Pattern urlPattern : this.excludedUrls) {
            final Matcher matcher = urlPattern.matcher(url);
            if (matcher.matches()) {
                if (this.logger.isDebugEnabled()) {
                    this.logger.debug("Exclude pattern " + urlPattern.pattern() + " matches " + url);
                }
                return true;
            }
        }
        
        return false;
    }
434270
public static Exception checkGrpcUrl(String url) {
        try {

            parseGrpcUrl(url);
            return null;

        } catch (Exception e) {
            return e;
        }
    }
320404
private boolean checkUrl(String url) {
        try {
            URI uri = new URI(url);
            return uri.isAbsolute();
        } catch (URISyntaxException e) {
            return false;
        }
    }
213948
public static boolean validateResource(String uriString) {
        if(uriString == null) {
            return false;
        }

        try {
            return validateResource(createUri(uriString));
        } catch(DataSourceException e) {
            Log.d(TAG, "URI is not valid", e);
            return false;
        }
    }
609150
public static Boolean canAccess(String url) {
		return ContextUtils.getAuthorizationEngine(ContextUtils.getRequest())
				.check(url) == null;
	}
1114093
public static boolean pingUrl(final String address) {

        try {

            final URL url = new URL("http://" + address);

            final HttpURLConnection urlConn = (HttpURLConnection) url
                    .openConnection();

            urlConn.setConnectTimeout(1000 * 10); // mTimeout is in seconds

            final long startTime = System.currentTimeMillis();

            urlConn.connect();

            final long endTime = System.currentTimeMillis();

            if (urlConn.getResponseCode() == HttpURLConnection.HTTP_OK) {
                LOGGER.info("Time (ms) : " + (endTime - startTime));
                LOGGER.info("Ping to " + address + " was success");
                return true;
            }

        } catch (final MalformedURLException e1) {
            e1.printStackTrace();
        } catch (final IOException e) {
            e.printStackTrace();
        }
        return false;
    }
761308
public static boolean isJarFileURL(URL url) {
		return (URL_PROTOCOL_FILE.equals(url.getProtocol()) && //
				url.getPath().toLowerCase().endsWith(FileUtil.JAR_FILE_EXT));
	}
442590
def validate_url(url):
    

    scheme = url.split('://')[0].lower()
    if scheme not in url_schemes:
        return False
    if not bool(url_regex.search(url)):
        return False
    return True
345658
def ValidateURL(url, column_name=None, problems=None):
  
  if IsEmpty(url) or IsValidURL(url):
    return True
  else:
    if problems:
      problems.InvalidValue(column_name, url)
    return False
569320
public static boolean isValidIp(final String ip) {
		if (ip == null || ip.length() == 0) {
			return false;
		}
		Matcher m = IS_VALID_IP_PATTERN.matcher(ip);
		return m.find();
		// return false;
		// }
		// return true;
	}
1043363
public static URL codeLocationFromURL(String url) {
        try {
            return new URL(url);
        } catch (Exception e) {
            throw new InvalidCodeLocation(url);
        }
    }