Validates that the parameter is not null

@param name      the parameter name
@param reference the proposed parameter value
763916
public static void parameterNotNull(final String name, final Object reference) {
        if (reference == null) {
            raiseError(format("Parameter '%s' is not expected to be null.", name));
        }
    }
750594
public void addParam(String name, String value) {
        if (name == null) {
            throw new NullPointerException("name");
        }
        if (value == null) {
            throw new NullPointerException("value");
        }
        params.add(new Param(name, value));
    }
183983
public static void requireArgValid(@NotNull final String name, @NotNull final String value) throws ConstraintViolationException {
        // CHECKSTYLE:ON
        final String trimmedValue = value.trim();
        Contract.requireArgNotEmpty(name, trimmedValue);
    }
441462
static boolean isNameReferenced(Node node, String name) {
    return isNameReferenced(node, name, Predicates.alwaysTrue());
  }
613936
public static boolean isStarQualifiedName(String name) {
    return name != null
        && name.endsWith(".*")
        && isQualifiedName(name.substring(0, name.length() - 2));
  }
982146
public static void checkResourceName(String name) {

        try {
            CmsResource.checkResourceName(name);
        } catch (CmsIllegalArgumentException e) {
            throw new CmisNameConstraintViolationException(e.getLocalizedMessage(), e);
        }
    }
222724
private void validate() {
        if (host.isEmpty()) {
            throw new IllegalArgumentException("host cannot be null");
        }
        if (catalog == null) {
            throw new IllegalArgumentException("namespace cannot be null");
        }
        if (table == null) {
            throw new IllegalArgumentException("set cannot be null");
        }
        if (portList.isEmpty()) {
            if(port>0){
                port(port);
            }else{
                throw new IllegalArgumentException("port cannot be null");
            }

        }
        if (host.size() != portList.size()) {
            throw new IllegalArgumentException("Host and ports cardinality must be the same");
        }

    }
351154
protected IStatus validateNameAgainstOtherSREs(String name) {
		IStatus nameStatus = SARLEclipsePlugin.getDefault().createOkStatus();
		if (isDuplicateName(name)) {
			nameStatus = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR,
					ISREInstall.CODE_NAME,
					Messages.SREInstallWizard_1);
		} else {
			final IStatus status = ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE);
			if (!status.isOK()) {
				nameStatus = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR,
						ISREInstall.CODE_NAME,
						MessageFormat.format(Messages.SREInstallWizard_2, status.getMessage()));
			}
		}
		return nameStatus;
	}
775479
protected static boolean isNameValid(String name) {
    Preconditions.checkNotNull(name);
    name = name.toLowerCase();
    return VALID_DB_TABLE_NAME_PATTERN_1.matcher(name).matches()
        && VALID_DB_TABLE_NAME_PATTERN_2.matcher(name).matches();
  }
732935
public static <T> T checkNotNull(final String name,
                                     final T parameter) {
        if (parameter == null) {
            throw new IllegalArgumentException("Parameter named '" + name + "' should be not null!");
        }
        return parameter;
    }
702000
public void setReference(String reference) {

        m_reference = reference;
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_SET_REFERENCE_1, m_reference));
        }
    }
494922
private static boolean validParameter(final Parameter p) {
        if (p.getNamespace() == null) {
            return false;
        }
        if (p.getValue() == null) {
            return false;
        }
        return true;
    }
513788
private void validate(TaskDef taskDef) {
        Preconditions.checkNotNull(taskDef, "TaskDef object cannot be null");
        Preconditions.checkNotNull(taskDef.getName(), "TaskDef name cannot be null");
    }
334110
<T extends Validatable> void validatePOJO(final T pojo, final String name) {
    try {
      pojo.validate();
    } catch (final IllegalArgumentException e) {
      throw new IllegalArgumentException("Invalid " + name, e);
    }
  }
593376
public static void validateName(String name) throws InvalidNameException {
        if (StringUtils.isEmpty(name)) {
            throw ExceptionFactory.invalidNameException(Messages.i18n.format("FieldValidator.EmptyNameError")); //$NON-NLS-1$
        }
    }
406411
Reference<T> lookupReference(String name, boolean isLongName) {
    if (isLongName) {
      for (Reference<T> r : referenceMap.values()) {
        if (r.longName.equals(name)) {
          return r;
        }
      }
      return null;
    }
    return referenceMap.get(name);
  }
648814
public static function verifyNotNull(string $method, string $name, $argument)
    {
        static::verify(
                $argument !== null,
                self::messageFormat($method, $name, 'cannot be null')
        );
    }