Iterates through and gathers the projects to validate along with scanning all the other
projects to gather their information for validating the projects.

@throws IOException
@throws JAXBException
183456
private void gatherMetatypeFilesAndStats() throws IOException, JAXBException {
        for (File bundle : directory.listFiles()) {
            if (bundle.isFile()) {
                analyzeBundle(bundle);
            }
        }
    }
624618
protected final void validateForMSBuild() throws MojoExecutionException
    {
        if ( !MSBuildPackaging.isValid( mavenProject.getPackaging() ) )
        {
            throw new MojoExecutionException( "Please set packaging to one of " + MSBuildPackaging.validPackaging() );
        }
        findMSBuild();
        validateProjectFile();
        platforms = MojoHelper.validatePlatforms( platforms );
    }
542343
private void validate() {

    if ((this.segments.length < 0) && (!this.snapshot)) {
      throw new IllegalArgumentException("segments.length:" + Integer.valueOf(this.segments.length));
    }
    for (int i = 0; i < this.segments.length; i++) {
      if (this.segments[i] < 0) {
        throw new IllegalArgumentException("segments[" + i + "]:" + Integer.valueOf(this.segments[i]));
      }
    }
    if (this.phaseNumber != null) {
      if (this.phaseNumber.intValue() < 0) {
        throw new IllegalArgumentException("phaseNumber:" + this.phaseNumber);
      }
      if (this.phase == null) {
        throw new IllegalArgumentException("phaseNumber (phase==null):" + this.phaseNumber);
      }
      if ((this.phase == DevelopmentPhase.RELEASE) && (this.phaseNumber.intValue() != 0)) {
        throw new IllegalArgumentException("phaseNumber (phase==RELEASE):" + this.phaseNumber);
      }
    }
  }
157234
@SuppressWarnings("unchecked")
    @Override
    protected Project initProject() {
        Collection errors = new ArrayList();
        String projectFilePathOrURI = getProjectIdentifier();
        return new Project(projectFilePathOrURI, errors);
    }
951900
@Override
  public ValidationReport loadProjectFlow(final Project project, final File projectDir) {
    convertYamlFiles(projectDir);
    FlowLoaderUtils.checkJobProperties(project.getId(), this.props, this.jobPropsMap, this.errors);
    return FlowLoaderUtils.generateFlowLoaderReport(this.errors);
  }
108793
public final void eval() throws IOException {
    final String component = this.parsedArguments.getString("component");
    final String testFile = this.parsedArguments.getString("testSet");
    final String model = this.parsedArguments.getString("model");
    Evaluate evaluator = null;

    if (component.equalsIgnoreCase("pos")) {
      evaluator = new POSEvaluate(testFile, model);
    } else {
      evaluator = new LemmaEvaluate(testFile, model);
    }
    if (this.parsedArguments.getString("evalReport") != null) {
      if (this.parsedArguments.getString("evalReport").equalsIgnoreCase(
          "detailed")) {
        evaluator.detailEvaluate();
      } else if (this.parsedArguments.getString("evalReport").equalsIgnoreCase(
          "error")) {
        evaluator.evalError();
      } else if (this.parsedArguments.getString("evalReport").equalsIgnoreCase(
          "brief")) {
        evaluator.evaluate();
      }
    } else {
      evaluator.evaluate();
    }
   
  }
597390
public final void evaluate() throws IOException {
    final SequenceLabelerEvaluator evaluator = new SequenceLabelerEvaluator(this.corpusFormat,
        this.sequenceLabeler);
    evaluator.evaluate(this.testSamples);
    System.out.println(evaluator.getFMeasure());
  }
614591
public final void crossValidate() throws IOException {

    final String paramFile = this.parsedArguments.getString("params");
    final TrainingParameters params = InputOutputUtils
        .loadTrainingParameters(paramFile);
    final POSCrossValidator crossValidator = new POSCrossValidator(params);
    crossValidator.crossValidate(params);
  }
46885
private void init() throws IOException {
    WR = new Path(conf.get("fs.snapshot.waitingroom", "/.WR"));
    WR = WR.makeQualified(dfs);
  }
1167317
@Override public void process(MPPReader reader, ProjectFile file, DirectoryEntry root) throws MPXJException, IOException
   {
      try
      {
         populateMemberData(reader, file, root);
         processProjectProperties();

         if (!reader.getReadPropertiesOnly())
         {
            processCalendarData();
            processResourceData();
            processTaskData();
            processConstraintData();
            processAssignmentData();

            if (reader.getReadPresentationData())
            {
               processViewPropertyData();
               processViewData();
               processTableData();
            }
         }
      }

      finally
      {
         clearMemberData();
      }
   }
772706
public final void evaluate() throws IOException {
    final ParserEvaluator evaluator = new ParserEvaluator(this.parser);
    evaluator.evaluate(this.testSamples);
    System.out.println(evaluator.getFMeasure());
  }
724931
protected boolean validateSARLSpecificElements(IJavaProject javaProject) {
		// Check if the "SARL" generation directory is a source folder.
		final IPath outputPath = SARLPreferences.getSARLOutputPathFor(javaProject.getProject());

		if (outputPath == null) {
			final String message = MessageFormat.format(
					Messages.BuildSettingWizardPage_0,
					SARLConfig.FOLDER_SOURCE_GENERATED);
			final IStatus status = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR, message);
			handleFinishException(getShell(), new InvocationTargetException(new CoreException(status)));
			return false;
		}
		if (!hasSourcePath(javaProject, outputPath)) {
			final String message = MessageFormat.format(
					Messages.SARLProjectCreationWizard_0,
					toOSString(outputPath),
					buildInvalidOutputPathMessageFragment(javaProject));
			final IStatus status = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR, message);
			handleFinishException(getShell(), new InvocationTargetException(new CoreException(status)));
			return false;
		}
		return true;
	}
833489
private void writeTasks() throws JAXBException
   {
      Tasks tasks = m_factory.createTasks();
      m_plannerProject.setTasks(tasks);
      List<net.sf.mpxj.planner.schema.Task> taskList = tasks.getTask();
      for (Task task : m_projectFile.getChildTasks())
      {
         writeTask(task, taskList);
      }
   }
1060588
public void generate() throws IOException {
        final Document doc = DocumentFactory.getInstance().createDocument();
        final Element root = doc.addElement("project");
        //iterate through entities in correct order
        for (final ResourceXMLParser.Entity entity : entities) {
            if (NODE_ENTITY_TAG.equals(entity.getResourceType())) {
                final Element ent = genEntityCommon(root, entity);
                genNode(ent, entity);
            }
        }

        if (null != file) {
            FileOutputStream out=new FileOutputStream(file);
            try{
                serializeDocToStream(out, doc);
            }finally{
                out.close();
            }
        } else if (null != output) {
            serializeDocToStream(output, doc);
        }
    }
1259432
public static void validateWebXML () throws Exception
  {
    final IMicroDocument aDoc = MicroReader.readMicroXML (new File ("src/main/webapp/WEB-INF/web.xml"));
    if (aDoc != null)
      for (final IMicroNode aNode : new MicroRecursiveIterator (aDoc.getDocumentElement ()))
        if (aNode.isElement ())
        {
          final IMicroElement e = (IMicroElement) aNode;
          if (e.getTagName ().endsWith ("-class"))
          {
            final String sClassName = e.getTextContentTrimmed ();
            try
            {
              Class.forName (sClassName);
            }
            catch (final Exception ex)
            {
              LOGGER.error ("Failed to resolve class '" + sClassName + "'");
              throw ex;
            }
          }
        }
  }
813659
protected void validate() throws IOException {
        if (null != this.error) {
            throw this.error;
        }
        if (isClosed()) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "validate - is closed: hc: " + this.hashCode() + " details: " + this);
            }

            throw new IOException("Stream is closed");
        }
        if (null == this.output) {
            setBufferSize(32768);
        }
    }
838676
private void skipToProject() throws IOException {
        final byte[] buffer = new byte[BUFFER_SIZE];
        super.mark(BUFFER_SIZE);
        int count = super.read(buffer, 0, BUFFER_SIZE);
        while (count > 0) {
            final int pos = findSequence(PROJECT, buffer);
            if (pos >= 0) {
                super.reset();
                super.skip(pos);
                return;
            } else if (count - PROJECT.length == 0) {
                return;
            }
            super.reset();
            super.skip(count - PROJECT.length);
            super.mark(BUFFER_SIZE);
            count = super.read(buffer, 0, BUFFER_SIZE);
        }
    }