Make sure the address is resolvable
494267
static List<InetSocketAddress> tryResolveHosts(final List<InetSocketAddress> hosts) {
        List<InetSocketAddress> resolvableHosts = new ArrayList<InetSocketAddress>();
        for (InetSocketAddress node : hosts) {
            try {
                node.getAddress().getHostAddress();
                resolvableHosts.add(node);
            } catch (NullPointerException ex) {
                LOGGER.error("Unable to resolve address " + node.toString());
            }
        }
        return resolvableHosts;
    }
538198
private static void checkAddress(String address, AddressFamily addrFamily) {
        if (addrFamily == null) {
            throw new NullPointerException("addrFamily");
        }

        switch (addrFamily) {
            case AF_UNSPEC:
                if (address != null) {
                    throw new HAProxyProtocolException("unable to validate an AF_UNSPEC address: " + address);
                }
                return;
            case AF_UNIX:
                return;
        }

        if (address == null) {
            throw new NullPointerException("address");
        }

        switch (addrFamily) {
            case AF_IPv4:
                if (!NetUtil.isValidIpV4Address(address)) {
                    throw new HAProxyProtocolException("invalid IPv4 address: " + address);
                }
                break;
            case AF_IPv6:
                if (!NetUtil.isValidIpV6Address(address)) {
                    throw new HAProxyProtocolException("invalid IPv6 address: " + address);
                }
                break;
            default:
                throw new Error();
        }
    }
253206
private void handleReady(String address) {
    log.debug(String.format("%s - Received ready message from %s", NetworkManager.this, address));
    ready.add(address);
    checkReady();
  }
807689
function( address, bank, size ) {
		var offset = bank * size,
			bankData = this.prgData.subarray( offset, offset + size );

		this.prgRead.set( bankData, address - 0x8000 );
	}
1358875
def validate_address(value):
    
    if is_bytes(value):
        if not is_binary_address(value):
            raise InvalidAddress("Address must be 20 bytes when input type is bytes", value)
        return

    if not isinstance(value, str):
        raise TypeError('Address {} must be provided as a string'.format(value))
    if not is_hex_address(value):
        raise InvalidAddress("Address must be 20 bytes, as a hex string with a 0x prefix", value)
    if not is_checksum_address(value):
        if value == value.lower():
            raise InvalidAddress(
                "Web3.py only accepts checksum addresses. "
                "The software that gave you this non-checksum address should be considered unsafe, "
                "please file it as a bug on their platform. "
                "Try using an ENS name instead. Or, if you must accept lower safety, "
                "use Web3.toChecksumAddress(lower_case_address).",
                value,
            )
        else:
            raise InvalidAddress(
                "Address has an invalid EIP-55 checksum. "
                "After looking up the address from the original source, try again.",
                value,
            )
424548
function relatedUserResolver(walletAddress, info){
  const requestedFields = info.fieldNodes[0].selectionSet.selections
  const isIdOnly = requestedFields.filter(x => x.name.value !== 'walletAddress')
    .length === 0
  if (isIdOnly) {
    return { walletAddress: walletAddress }
  } else {
    return search.User.get(walletAddress)
  }
}
767388
private Address getReplicaAddress(int partitionId, int replicaNumber, int backupCount) {
        IPartition partition = partitionService.getPartition(partitionId);
        Address replicaAddress = partition.getReplicaAddress(replicaNumber);
        if (replicaAddress == null) {
            replicaAddress = waitForReplicaAddress(replicaNumber, partition, backupCount);
        }
        return replicaAddress;
    }
133410
public static void validateAddress(String address) throws ServiceException {
        if (address == null || address.isEmpty()) {
            throw new ServiceException(
                    ErrorCode.SERVICE_INSTANCE_ADDRESS_FORMAT_ERROR);
        }
    }
189705
private void maybeMarkCurrentAddressAsUsed(LegacyAddress address) {
        checkArgument(address.getOutputScriptType() == ScriptType.P2SH);
        for (Map.Entry<KeyChain.KeyPurpose, Address> entry : currentAddresses.entrySet()) {
            if (entry.getValue() != null && entry.getValue().equals(address)) {
                log.info("Marking P2SH address as used: {}", address);
                currentAddresses.put(entry.getKey(), freshAddress(entry.getKey()));
                return;
            }
        }
    }
301564
def resolve(path_or_address=None, address=None, *ignored):
    
    if path_or_address is None or address is not None:
        return path_or_address, address

    path = None
    if split_address(path_or_address)[1] is not None:
        address = path_or_address
    else:
        path = path_or_address

    return path, address
903822
def address(self):
        
        bind = self.settings.get('bind')
        if bind:
            return parse_address(to_bytes(bind.get()))
581171
public static void validateAddress(String address) {
		// Check for improperly formatted addresses
		Matcher matcher = ADDRESS_PATTERN.matcher(address);
		if(!matcher.matches()) {
			String message = "The address must have the format X.X.X.X";
			throw new IllegalArgumentException(message);
		}

		// Check for out of range address components
		for(int i = 1; i <= 4; i++) {
			int component = Integer.parseInt(matcher.group(i));
			if(component < 0 || component > 255) {
				String message = "All address components must be in the range [0, 255]";
				throw new IllegalArgumentException(message);
			}
		}
	}
719179
def onelineaddress(self, address, **kwargs):
        '''
        '''
        fields = {
            'address': address,
        }

        return self._fetch('onelineaddress', fields, **kwargs)
1260619
function process(payload) {
  var addressType = parseInt(payload.substr(0,1),16);
  var typeCode = payload.substr(1,1);
  var length = parseInt(payload.substr(2,2),16) % 64;
  var rxAdd = "public";
  var txAdd = "public";
  if(addressType & 0x8) {
    rxAdd = "random";
  }
  if(addressType & 0x4) {
    txAdd = "random";
  }   
  var type;
  switch(typeCode) {
    case("0"):
      type = TYPE0_NAME;
      break;
    case("1"):
      type = TYPE1_NAME;
      break;
    case("2"):
      type = TYPE2_NAME;
      break;
    case("3"):
      type = TYPE3_NAME;
      break;
    case("4"):
      type = TYPE4_NAME;
      break;
    case("5"):
      type = TYPE5_NAME;
      break;
    case("6"):
      type = TYPE6_NAME;
      break;
    default: 
      type = TYPE_UNDEFINED_NAME;
  }
  return { type: type,
           length: length,
           txAdd: txAdd,
           rxAdd: rxAdd
  };
}
1267522
def already_coords(self, address):
        """"""

        m = re.search(self.COORD_MATCH, address)
        return (m != None)
598710
def set_address(addr):
    """"""
    # Send DNLOAD with first byte=0x21 and page address
    buf = struct.pack("<BI", 0x21, addr)
    __dev.ctrl_transfer(0x21, __DFU_DNLOAD, 0, __DFU_INTERFACE, buf, __TIMEOUT)

    # Execute last command
    if get_status() != __DFU_STATE_DFU_DOWNLOAD_BUSY:
        raise Exception("DFU: set address failed")

    # Check command state
    if get_status() != __DFU_STATE_DFU_DOWNLOAD_IDLE:
        raise Exception("DFU: set address failed")
1355848
def normalize(self, address, **kwargs):
        """"""
        # TODO: normalize well-known parts like "Street", "Road", etc.
        # TODO: consider using https://github.com/openvenues/pypostal
        addresses = super(AddressType, self).normalize(address, **kwargs)
        return addresses