Return of "True" means IP has was removed.
Return of "False" means IP wasn't being denied.

@param ip
@return
8111
public static synchronized boolean removeDenyIP(String ip) {
		if(deniedIP!=null && deniedIP.remove(ip)!=null) {
			writeIP();
			if(deniedIP.isEmpty()) {
				deniedIP=null;
			}
			return true;
		}
		return false;
	}
834234
def is_reserved_ip(self, ip):
        
        theip = ipaddress(ip)
        for res in self._reserved_netmasks:
            if theip in ipnetwork(res):
                return True
        return False
1334046
function(ip) {
		var unique = true;
		for(var key in cloak.getLobby().getMembers()) {
			if(ip == cloak.getLobby().getMembers()[key].data.ip)
				unique = false;
	    }
		return unique;
	}
1724
def _valid_ip(ip_address):
    '''
    
    '''

    try:
        address = ipaddress.IPv4Address(ip_address)
    except ipaddress.AddressValueError:
        return False

    if address.is_unspecified or \
        address.is_loopback or \
        address.is_link_local or \
        address.is_multicast or \
        address.is_reserved:
        return False

    return True
877573
def matches_ip(self, ip):
        """"""

        # Check the cache if caching is enabled
        if self.cache is not None:
            matches_ip = self.cache.get(ip)
            if matches_ip is not None:
                return matches_ip

        # Query MongoDB to see if the IP is blacklisted
        matches_ip = IPNetwork.matches_ip(
            ip, read_preference=self.read_preference)

        # Cache the result if caching is enabled
        if self.cache is not None:
            self.cache[ip] = matches_ip

        return matches_ip
823020
private static boolean isIPAdressValid(final String ip){

        // InetAddress.getByName() validates 'null' as a valid IP (localhost).
        // we do not want that
        if (hasValue(ip)) {
            return IP_ADDR_PATTERN.matcher(ip).matches();
        }
        return false;
    }
1039409
private static boolean containsAddress(final InetAddress network, final InetAddress netmask, final InetAddress ip) {
        LOGGER.debug("Checking IP address: [{}] in [{}] by [{}]", ip, network, netmask);
        val networkBytes = network.getAddress();
        val netmaskBytes = netmask.getAddress();
        val ipBytes = ip.getAddress();
        /* check IPv4/v6-compatibility or parameters: */
        if (networkBytes.length != netmaskBytes.length || netmaskBytes.length != ipBytes.length) {
            LOGGER.debug("Network address [{}], subnet mask [{}] and/or host address [{}]" + " have different sizes! (return false ...)", network, netmask, ip);
            return false;
        }
        /* Check if the masked network and ip addresses match: */
        for (var i = 0; i < netmaskBytes.length; i++) {
            val mask = netmaskBytes[i] & HEX_RIGHT_SHIFT_COEFFICIENT;
            if ((networkBytes[i] & mask) != (ipBytes[i] & mask)) {
                LOGGER.debug("[{}] is not in [{}]/[{}]", ip, network, netmask);
                return false;
            }
        }
        LOGGER.debug("[{}] is in [{}]/[{}]", ip, network, netmask);
        return true;
    }
538462
private function isAllowed($ip) {
        // Look for a wildcard
        if (in_array('*', $this->params['allow'])) {
            // There is a wildcard in the list, all IP's are allowed
            return true;
        }

        // Remove IP's which is not of the same type as $ip before matching
        if ($this->isIPv6($ip)) {
            $list = array_filter($this->params['allow'], [$this, 'isIPv6']);
        } else {
            $list = array_filter($this->params['allow'], [$this, 'isIPv4']);
        }

        foreach ($list as $range) {
            if ((strpos($range, '/') !== false && $this->cidrMatch($ip, $range)) || $ip === $range) {
                return true;
            }
        }

        return false;
    }
1158821
def hasIP(self, ip):
        """"""

        for f in self.features:
            if (f.prop.startswith("net_interface.") and
                    f.prop.endswith(".ip") and f.value == ip):
                return True
        return False
88139
public DescribeIpResponse describeIp(String ip) {
        DescribeIpRequest request = new DescribeIpRequest()
                .withIp(ip);
        return describeIp(request);
    }
116808
public boolean inRange(InetAddress ip) {
        if (greaterThan(ip, ipHigher))
            return false;
        else if (lessThan(ip, ipLower))
            return false;
        else
            return true;
    }
15938
def disassociate_public_ip(self, public_ip_id):
        """"""
        floating_ip = self.client.floating_ips.get(public_ip_id)
        floating_ip = floating_ip.to_dict()
        instance_id = floating_ip.get('instance_id')
        address = floating_ip.get('ip')

        self.client.servers.remove_floating_ip(instance_id, address)

        return True
1256198
public static function isValid(string $ip = null)
    {
        if (is_null($ip)) {
            $ip = self::get();
        }

        return filter_var($ip, FILTER_VALIDATE_IP) == $ip;
    }
346197
def is_valid_ip_pattern(ip):
    """"""
    ip = ip.replace('*', '1')
    try:
        socket.inet_aton(ip)
        return True
    except socket.error:
        # Not a valid IPv4 address pattern
        return False
774983
def get_ip_info(ip_str):
    
    ip = None
    is_routable_ip = False
    if is_valid_ip(ip_str):
        ip = ip_str
        is_routable_ip = is_public_ip(ip)
    return ip, is_routable_ip
320150
public static function isSameOrAnonymizedIp($ip, $currentIp)
    {
        $ip = array_reverse(explode('.', $ip));
        $currentIp = array_reverse(explode('.', $currentIp));

        if (count($ip) != count($currentIp)) {
            return false;
        }

        foreach ($ip as $i => $byte) {
            if ($byte == 0) {
                $currentIp[$i] = 0;
            } else {
                break;
            }
        }

        foreach ($ip as $i => $byte) {
            if ($byte != $currentIp[$i]) {
                return false;
            }
        }
        return true;
    }
512548
public static boolean isValidArg(String arg) {
    final String[] args = arg.split(":");
    if (args.length != 2) {
      return false;
    }

    final String ip = args[1];
    return InetAddresses.isInetAddress(ip);
  }