A call of this method should validate the positions of the panels
components.
424877
@Override
	public void relocate()
	{

		int w = 555, h = 235;
		int x = (this.getWidth() - w) / 2, y = (this.getHeight() - h) / 2;

		archiveScrollPane.setLocation(x, y);

		addArchiveButton.setLocation(x + 435, y + 10);
		removeArchiveButton.setLocation(x + 435, y + 40);

		encodingLabel.setLocation(x, y + 220);
		encodingField.setLocation(x + 210, y + 220);

		surrogatePanel.setLocation(x + 415, y + 85);

	}
835586
private void validateInput(String resourceName, Collection<String> requiredRoles) {
        if (requiredRoles == null) {
            throw new NullPointerException("requiredRoles cannot be null.");
        } else if (resourceName == null) {
            throw new NullPointerException("resourceName cannot be null.");
        }
    }
1363618
private void init() {
        setTitle("Validation Framework Test");
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

        // Add contents
        JPanel contentPane = new JPanel(new MigLayout("fill, wrap 1", "[]", "[grow]unrelated[]"));
        setContentPane(contentPane);

        contentPane.add(new JScrollPane(table), "grow");
        installValidators(table);
        contentPane.add(changeButton, "align right");

        // Set size
        pack();
        Dimension size = getSize();
        size.width += 100;
        setMinimumSize(size);

        // Set location
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setLocation((screenSize.width - size.width) / 2, (screenSize.height - size.height) / 3);
    }
24103
public void validate() {
    if (interval == null || interval.isEmpty()) {
      throw new IllegalArgumentException("Missing or empty interval");
    }
    DateTime.parseDuration(interval);
    
    if (aggregator == null || aggregator.isEmpty()) {
      throw new IllegalArgumentException("Missing or empty aggregator");
    }
    try {
      Aggregators.get(aggregator.toLowerCase());
    } catch (final NoSuchElementException e) {
      throw new IllegalArgumentException("Invalid aggregator");
    }
    
    if (fill_policy != null) {
      fill_policy.validate();
    }
  }
873366
public void validate(FacesContext context,
                         UIComponent  component,
                         Object       value) throws ValidatorException {
	if (null == context || null == component) {
	    throw new NullPointerException();
	}
        try {
            methodBinding.invoke(context, new Object[] {context, component, 
							value});
        } 
	catch (EvaluationException ee) {
	    Throwable cause = this.getExpectedCause(ValidatorException.class,
						    ee);
	    if (cause instanceof ValidatorException) {
		throw ((ValidatorException) cause);
	    }
	    if (cause instanceof RuntimeException) {
		throw ((RuntimeException) cause);
	    }
	    throw new IllegalStateException(ee);
        }
	
	
    }
1118061
public final void validate() {
    this.accept(new TreeVisitor() {
      @Override
      public boolean preVisit(TreeNode node) {
        node.validateInner();
        return true;
      }
    });
  }
411301
public void validate() {
        if (this.mapStartPosition != null && this.bboxConfiguration != null
                && !this.bboxConfiguration.contains(this.mapStartPosition)) {
            throw new IllegalArgumentException(
                    "map start position is not valid, must be included in bounding box of the map, bbox: "
                            + this.bboxConfiguration.toString() + " - map start position: "
                            + this.mapStartPosition.toString());
        }
    }
384042
@Override
    public void validate() {
        //validate the parameters
        String target = getTargetName();
        if (maxRetries() < -1) {

            throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "retry.parameter.invalid.value.CWMFT5010E", "maxRetries", maxRetries(), target, "-1"));
        }
        if ((delay() < 0)) {

            throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "retry.parameter.invalid.value.CWMFT5010E", "delay", delay(), target, "0"));
        }
        if ((jitter() < 0)) {

            throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "retry.parameter.invalid.value.CWMFT5010E", "jitter", jitter(), target, "0"));
        }
        if (maxDuration() < 0) {

            throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "retry.parameter.invalid.value.CWMFT5010E", "maxDuration", maxDuration(), target, "0"));
        }
        if (maxDuration() != 0) {
            Duration maxDuration = Duration.of(maxDuration(), durationUnit());
            Duration delay = Duration.of(delay(), delayUnit());
            if (maxDuration.compareTo(delay) < 0) {
                throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "retry.parameter.invalid.value.CWMFT5017E", maxDuration(), durationUnit(), target,
                                                                             delay(),
                                                                             delayUnit()));

            }
        }
        if (tc.isWarningEnabled()) {
            if ((delay() != 0) && (jitter() != 0)) {
                Duration jitter = Duration.of(jitter(), jitterDelayUnit());
                Duration delay = Duration.of(delay(), delayUnit());
                if (jitter.compareTo(delay) >= 0) {
                    Tr.warning(tc, "retry.parameter.invalid.value.CWMFT5019W", jitter(), jitterDelayUnit(), target,
                               delay(),
                               delayUnit());

                }
            }
        }
    }
767617
public void validateAndSubmit() {

        CmsValidationController validationController = new CmsValidationController(
            m_fields.values(),
            new I_CmsValidationHandler() {

                /**
                 * @see org.opencms.gwt.client.validation.I_CmsValidationHandler#onValidationFinished(boolean)
                 */
                public void onValidationFinished(boolean ok) {

                    m_formHandler.onSubmitValidationResult(CmsForm.this, ok);
                }

                /**
                 * @see org.opencms.gwt.client.validation.I_CmsValidationHandler#onValidationResult(java.lang.String, org.opencms.gwt.shared.CmsValidationResult)
                 */
                public void onValidationResult(String field, CmsValidationResult result) {

                    updateFieldValidationStatus(field, result);

                }

            });
        validationController.setFormValidator(m_validatorClass);
        validationController.setFormValidatorConfig(createValidatorConfig());
        startValidation(validationController);
    }
682327
def validate(self):
        
        if self.required and len(self.selected()) == 0:
            raise ReliureError("No component selected for block '%s'" % self.name)
641837
protected void validate() {

        CmsRpcAction<CmsAliasEditValidationReply> action = new CmsRpcAction<CmsAliasEditValidationReply>() {

            @Override
            public void execute() {

                CmsAliasEditValidationRequest validationRequest = new CmsAliasEditValidationRequest();

                List<CmsAliasTableRow> rows = m_view.getLiveData();
                validationRequest.setEditedData(rows);
                validationRequest.setOriginalData(m_initialData);
                getService().validateAliases(validationRequest, this);
            }

            @Override
            public void onResponse(CmsAliasEditValidationReply result) {

                stop(false);
                List<CmsAliasTableRow> changedRows = result.getChangedRows();
                m_view.update(changedRows);
                updateValidationStatus();
            }

        };
        action.execute();
    }
774575
@Override
  public void validate() {
    try {
      IFD ifd = model.getFirstIFD();
      int n = 0;
      while (ifd != null) {
        validateIfd(ifd, n);
        ifd = ifd.getNextIFD();
        n++;
      }
    } catch (Exception e) {

    }
  }
561119
def _compute_layout_validator(self):
    """"""
    self._layout_validator = valid_layouts.LayoutValidator(self.mtf_graph,
                                                           self.mesh_shape)
605265
public void validate() {
    Preconditions.checkState(getMaxLogSize() <= Integer.MAX_VALUE,
        "{} has value {} but must not exceed {}", PropertyKey.MASTER_JOURNAL_LOG_SIZE_BYTES_MAX,
        getMaxLogSize(), Integer.MAX_VALUE);
    Preconditions.checkState(getHeartbeatIntervalMs() < getElectionTimeoutMs() / 2,
        "Heartbeat interval (%sms) should be less than half of the election timeout (%sms)",
        getHeartbeatIntervalMs(), getElectionTimeoutMs());
    Preconditions.checkState(getClusterAddresses().contains(getLocalAddress()),
        "The cluster addresses (%s) must contain the local master address (%s)",
        getClusterAddresses(), getLocalAddress());
  }
62574
protected boolean validate(char[] component, int soffset, int eoffset,
            BitSet generous) {
        return super.validate(component, soffset, eoffset, lax(generous));
    }
956600
public void checkValidatorCalled() {
        if (!execute.isSuppressValidatorCallCheck() && certainlyNotBeValidatorCalled()) {
            execute.getFormMeta().filter(meta -> isValidatorAnnotated(meta)).ifPresent(meta -> {
                throwLonelyValidatorAnnotationException(meta); // #hope see fields in nested element
            });
        }
    }
1284617
def set_checks(self, checks, position=None):
        """"""
        if position is None:
            position = self.position
        self.checkdefs[position][0] = checks