Main method. Processes the whole dump using this processor and writes the
results to a file. To change which dump file to use and whether to run in
offline mode, modify the settings in {@link ExampleHelpers}.

@param args
@throws IOException
338064
public static void main(String[] args) throws IOException {
		ExampleHelpers.configureLogging();
		GenderRatioProcessor.printDocumentation();

		GenderRatioProcessor processor = new GenderRatioProcessor();
		ExampleHelpers.processEntitiesFromWikidataDump(processor);
		processor.writeFinalResults();
	}
203450
public static void main(String[] args) throws IOException {
        CommandLineInterface cli = new CommandLineInterface();
        cli.addOpt("-d", "directory", "./");
        cli.addOpt("-a", "alpha", "" + DEFAULT_ALPHA);
        cli.addOpt("-s", "seed", null);
        cli.parse(args);

        if (cli.hasParam("--genprofile")) {
            cli.generateProfile();
        } else if (cli.hasParam("--detectlang")) {
            cli.detectLang();
        } else if (cli.hasParam("--batchtest")) {
            cli.batchTest();
        }
    }
1025112
public static void main(String[] args) throws IOException {
		ExampleHelpers.configureLogging();
		ClassPropertyUsageAnalyzer.printDocumentation();

		ClassPropertyUsageAnalyzer processor = new ClassPropertyUsageAnalyzer();
		ExampleHelpers.processEntitiesFromWikidataDump(processor);
		processor.writeFinalReports();
	}
249870
public static void main(String[] args) throws IOException, AWTException {
        logger.entry();
          
        File file = new File("/home/karsten/samples/65535sects.exe"); 
        ReportCreator reporter = ReportCreator.apply(file);
        reporter.printReport();
//        File file2 = new File("/home/katja/samples/tesla2");
//        List<File> list = new ArrayList<>();
//        list.add(file);
//        list.add(file2);
        // TODO create Unit test for resource type with name!
//        for (File file : folder.listFiles()) {
//            if (!file.isDirectory() && new PESignature(file).exists()) {
//            	System.out.println("Report for " + file.getName());
//            	System.out.println();
//            	DiffReportCreator.newInstance(list).printReport();
//            }
//        }
        
//         VisualizerBuilder builder = new VisualizerBuilder();
//         Visualizer vi = builder.build();
//         final BufferedImage entropyImage = vi.createEntropyImage(file);
//         final BufferedImage structureImage = vi.createImage(file);
//         final BufferedImage appendedImage = ImageUtil.appendImages(
//         entropyImage, structureImage);
//         show(appendedImage);
    }
648863
public static void main(String[] args) {
    try {
      ToolRunner.run(new ProcessingRecordsPrinter(), args);
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
379356
public static void main(String[] args) throws IOException {
		ExampleHelpers.configureLogging();
		DataExtractionProcessor.printDocumentation();

		DataExtractionProcessor processor = new DataExtractionProcessor();
		ExampleHelpers.processEntitiesFromWikidataDump(processor);
		processor.close();
	}
991140
public static void main(String[] args) throws IOException {
//        Control c = new Control();
//        c.process(args);
        String cmd = "test jsjs {1} {0} ksksks {2}";
        System.out.println(MessageFormat.format(cmd, 1, 2, "test"));
    }
1195423
public static void main(String[] args) {
    if (args.length == 0) {
      Options.help(true);
    }
    long startTime = System.currentTimeMillis();

    List<String> files = null;
    Options options = new Options();

    try {
      files = options.load(args);
      if (files.isEmpty()) {
        Options.usage("no source files");
      }
    } catch (IOException e) {
      ErrorUtil.error(e.getMessage());
      System.exit(1);
    }

    run(files, options);

    TimingLevel timingLevel = options.timingLevel();
    if (timingLevel == TimingLevel.TOTAL || timingLevel == TimingLevel.ALL) {
      System.out.printf("j2objc execution time: %d ms\n", System.currentTimeMillis() - startTime);
    }

    // Run last, since it calls System.exit() with the number of errors.
    checkErrors(options.treatWarningsAsErrors());
  }
23238
public void dump() throws IOException {
    FileWriter out = new FileWriter(outFile, true);
    try {
      dump(out);
    } finally {
      out.close();
    }
  }
357331
public static void main(String[] args) {
    if (args.length != 0) {
      LOG.info("java -cp {} {}", RuntimeConstants.ALLUXIO_JAR,
          AlluxioMaster.class.getCanonicalName());
      System.exit(-1);
    }

    CommonUtils.PROCESS_TYPE.set(CommonUtils.ProcessType.MASTER);
    MasterProcess process;
    try {
      process = AlluxioMasterProcess.Factory.create();
    } catch (Throwable t) {
      ProcessUtils.fatalError(LOG, t, "Failed to create master process");
      // fatalError will exit, so we shouldn't reach here.
      throw t;
    }

    // Register a shutdown hook for master, so that master closes the journal files when it
    // receives SIGTERM.
    ProcessUtils.stopProcessOnShutdown(process);
    ProcessUtils.run(process);
  }
800590
public void run(List<String> args) throws IOException {
    checkNotNull(args);

    Process p = runFunc.run(path(args));
    assert (p != null);

    try {
      // TODO Move the copy onto a thread, so that FFmpegProgressListener can be on this thread.

      // Now block reading ffmpeg's stdout. We are effectively throwing away the output.
      CharStreams.copy(wrapInReader(p), System.out); // TODO Should I be outputting to stdout?

      throwOnError(p);

    } finally {
      p.destroy();
    }
  }
732207
public static void main(String[] args) {
		ExampleHelpers.configureLogging();
		LifeExpectancyProcessor.printDocumentation();

		LifeExpectancyProcessor processor = new LifeExpectancyProcessor();
		ExampleHelpers.processEntitiesFromWikidataDump(processor);
		processor.writeFinalResults();
	}
582115
public static void main(String[] args) throws IOException {
	if (!checkArgs(args)) {
	    displayHelp();
	    return;
	}
	
	String modelDir = args[2];
	boolean isAll = (args[0].compareToIgnoreCase("-all") == 0);
	boolean isTrn = (args[0].compareToIgnoreCase("-trn") == 0);
	boolean isTst = (args[0].compareToIgnoreCase("-tst") == 0);
	boolean isCont = (args[0].compareToIgnoreCase("-cont") == 0); //TUNC
	
	// create option object
	Option option = new Option(modelDir);
	
	option.optionFile = args[4];
	
	option.readOptions();
	
	Data data = null;
	Dictionary dict = null;
	FeatureGen feaGen = null;
	Train train = null;
	Inference inference = null;
	Evaluation evaluation = null;
	Model model = null;
	
	PrintWriter foutModel = null;
	BufferedReader finModel = null;
	
	if (isAll) {
	    // both training and testing
	    
	    PrintWriter flog = option.openTrainLogFile();
	    if (flog == null) {
		System.out.println("Couldn't create training log file");
		return;
	    }
	    
	    foutModel = option.createModelFile();
	    if (foutModel == null) {
		System.out.println("Couldn't create model file");
		return;
	    }	    	    
	    
	    data = new Data(option);
	    data.readTrnData(option.modelDir + File.separator + option.trainDataFile);	    
	    data.readTstData(option.modelDir + File.separator + option.testDataFile);	    	    
	    
	    dict = new Dictionary(option, data);
	    dict.generateDict();
	    
	    feaGen = new FeatureGen(option, data, dict);
	    feaGen.generateFeatures();
	    
	    data.writeCpMaps(dict, foutModel);
	    data.writeLbMaps(foutModel);	    
	    
	    train = new Train();
	    inference = new Inference();
	    evaluation = new Evaluation();
	    
	    model = new Model(option, data, dict, feaGen, train, inference, evaluation);
	    model.doTrain(flog);	    	    
	    
	    model.doInference(model.data.tstData);
	    model.evaluation.evaluate(flog);
	    
	    dict.writeDict(foutModel);
	    feaGen.writeFeatures(foutModel);
	    
	    foutModel.close();
	}
	
	if (isTrn) {
	    // training only
	    
	    PrintWriter flog = option.openTrainLogFile();
	    if (flog == null) {
		System.out.println("Couldn't create training log file");
		return;
	    }	    

	    foutModel = option.createModelFile();
	    if (foutModel == null) {
		System.out.println("Couldn't create model file");
		return;
	    }
	    
	    data = new Data(option);
	    data.readTrnData(option.modelDir + File.separator + option.trainDataFile);	    
	    
	    dict = new Dictionary(option, data);
	    dict.generateDict();
	    
	    feaGen = new FeatureGen(option, data, dict);
	    feaGen.generateFeatures();
	    
	    data.writeCpMaps(dict, foutModel);
	    data.writeLbMaps(foutModel);	    	    

	    train = new Train();	    
	    
	    model = new Model(option, data, dict, feaGen, train, null, null);	    	    
	    model.doTrain(flog);	    
	    
	    dict.writeDict(foutModel);
	    feaGen.writeFeatures(foutModel);
	    
	    foutModel.close();
	}
	
	if (isTst) {
	    // testing only
	    
	    finModel = option.openModelFile();
	    if (finModel == null) {
		System.out.println("Couldn't open model file");
		return;
	    }	    
	    
	    data = new Data(option);
	    data.readCpMaps(finModel);
	    data.readLbMaps(finModel);	    
	    data.readTstData(option.modelDir + File.separator + option.testDataFile);	    
	
	    dict = new Dictionary(option, data);	    
	    dict.readDict(finModel);
	    
	    feaGen = new FeatureGen(option, data, dict);
	    feaGen.readFeatures(finModel);
	    
	    inference = new Inference();
	    evaluation = new Evaluation();
	    
	    model = new Model(option, data, dict, feaGen, null, inference, evaluation);	    
	    
	    model.doInference(model.data.tstData);
	    model.evaluation.evaluate(null);
	    
	    finModel.close();	    
	}	
	
	if (isCont){ //continue last training
		PrintWriter flog = option.openTrainLogFile(); //append
	    if (flog == null) {
		System.out.println("Couldn't create training log file");
		return;
	    }	 
		    
		finModel = option.openModelFile();
	    if (finModel == null) {
		System.out.println("Couldn't open model file");
		return;
	    }	    
	    
	    data = new Data(option);
	    data.readCpMaps(finModel);
	    data.readLbMaps(finModel);	    
	    data.readTstData(option.modelDir + File.separator + option.testDataFile);	    
	
	    dict = new Dictionary(option, data);	    
	    dict.readDict(finModel);
	    
	    feaGen = new FeatureGen(option, data, dict);
	    feaGen.readFeatures(finModel);
	    
	    inference = new Inference();
	    evaluation = new Evaluation();
	    
	    foutModel = option.createModelFile(); //overwrite the old model file
	    if (foutModel == null) {
			System.out.println("Couldn't create model file");
			return;
		    }
	    
	    model = new Model(option, data, dict, feaGen, train, inference, evaluation);
	    model.doTrain(flog);	    	    
	    
	    model.doInference(model.data.tstData);
	    model.evaluation.evaluate(flog);	
	    
	    foutModel.close();
	}
    }
402598
public static void main(String[] args) {
        try {
        	CSVDumper app = new CSVDumper();
        	app.parseArgs(args);
        	app.run();
            System.exit(0);
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }        
    }
683084
public static void main(String[] args) throws IOException {
    GenerateSoyUtilsEscapingDirectiveCode generator = new GenerateSoyUtilsEscapingDirectiveCode();
    generator.configure(args);
    generator.execute();
  }
132396
public static void main(String... argv) throws IOException {
    run(System.out, argv);
    System.out.println();
  }
39184
public static void main(String[] args)
   {
      try
      {
         if (args.length != 2)
         {
            System.out.println("Usage: HexDump <input file name> <output text file name>");
         }
         else
         {
            System.out.println("Dump started.");
            long start = System.currentTimeMillis();
            process(args[0], args[1]);
            long elapsed = System.currentTimeMillis() - start;
            System.out.println("Dump completed in " + elapsed + "ms");
         }
      }

      catch (Exception ex)
      {
         System.out.println("Caught " + ex.toString());
      }
   }