csvloader main. (main is directly used by tests as well be sure to reset statics that you need to start over)

@param args
@throws IOException
@throws InterruptedException
428064
public static void main(String[] args) throws IOException,
            InterruptedException {
        start = System.currentTimeMillis();
        long insertTimeStart = start;
        long insertTimeEnd;
        FileReader fr = null;
        BufferedReader br = null;
        final CSVConfig cfg = new CSVConfig();
        cfg.parse(CSVLoader.class.getName(), args);
        config = cfg;
        if (config.noquotechar) {
            config.quotechar = '\u0000';
        }

        configuration();

        final Tokenizer tokenizer;
        ICsvListReader listReader = null;
        try {
            if (CSVLoader.standin) {
                tokenizer = new Tokenizer(new BufferedReader(new InputStreamReader(System.in)), csvPreference,
                        config.strictquotes, config.escape, config.columnsizelimit,
                        config.skip, config.header);
                listReader = new CsvListReader(tokenizer, csvPreference);
            } else {
                FileInputStream fis = new FileInputStream(config.file);
                InputStreamReader isr = new InputStreamReader(fis, config.charset);
                tokenizer = new Tokenizer(isr,
                          csvPreference,
                          config.strictquotes,
                          config.escape,
                          config.columnsizelimit,
                          config.skip,
                          config.header);

                listReader = new CsvListReader(tokenizer, csvPreference);
            }
        } catch (FileNotFoundException e) {
            System.err.println("CSV file '" + config.file + "' could not be found.");
            System.exit(-1);
        }
        // Split server list
        final String[] serverlist = config.servers.split(",");

        // read username and password from txt file
        if (config.credentials != null && !config.credentials.trim().isEmpty()) {
            Properties props = MiscUtils.readPropertiesFromCredentials(config.credentials);
            config.user = props.getProperty("username");
            config.password = props.getProperty("password");
        }

        // If we need to prompt the user for a password, do so.
        config.password = CLIConfig.readPasswordIfNeeded(config.user, config.password, "Enter password: ");

        // Create connection
        final ClientConfig c_config;
        AutoReconnectListener listener = new AutoReconnectListener();
        if (config.stopondisconnect) {
            c_config = new ClientConfig(config.user, config.password, null);
            c_config.setReconnectOnConnectionLoss(false);
        } else {
            c_config = new ClientConfig(config.user, config.password, listener);
            c_config.setReconnectOnConnectionLoss(true);
        }
        if (config.ssl != null && !config.ssl.trim().isEmpty()) {
            c_config.setTrustStoreConfigFromPropertyFile(config.ssl);
            c_config.enableSSL();
        }
        if (!config.kerberos.trim().isEmpty()) {
            c_config.enableKerberosAuthentication(config.kerberos);
        }
        c_config.setProcedureCallTimeout(0); // Set procedure all to infinite
        Client csvClient = null;
        try {
            csvClient = CSVLoader.getClient(c_config, serverlist, config.port);
        } catch (Exception e) {
            System.err.println("Error connecting to the servers: "
                    + config.servers);
            System.exit(-1);
        }
        assert (csvClient != null);

        try {
            long readerTime;
            long insertCount;
            long ackCount;
            long rowsQueued;
            final CSVLoader errHandler = new CSVLoader();
            final CSVDataLoader dataLoader;

            errHandler.launchErrorFlushProcessor();

            if (config.useSuppliedProcedure) {
                dataLoader = new CSVTupleDataLoader((ClientImpl) csvClient, config.procedure, errHandler);
            } else {
                dataLoader = new CSVBulkDataLoader((ClientImpl) csvClient, config.table, config.batch, config.update, errHandler);
            }
            if (!config.stopondisconnect) {
                listener.setLoader(dataLoader);
            }

            CSVFileReader.initializeReader(cfg, csvClient, listReader);

            CSVFileReader csvReader = new CSVFileReader(dataLoader, errHandler);

            Thread readerThread = new Thread(csvReader);
            readerThread.setName("CSVFileReader");
            readerThread.setDaemon(true);

            //Wait for reader to finish.
            readerThread.start();
            readerThread.join();

            insertTimeEnd = System.currentTimeMillis();

            csvClient.close();

            errHandler.waitForErrorFlushComplete();

            readerTime = (csvReader.m_parsingTime) / 1000000;
            insertCount = dataLoader.getProcessedRows();
            ackCount = insertCount - dataLoader.getFailedRows();
            rowsQueued = CSVFileReader.m_totalRowCount.get();

            //Close the reader.
            try {
               listReader.close();
            } catch (Exception ex) {
                //Do nothing here.
            }

            if (errHandler.hasReachedErrorLimit()) {
               System.out.println("The number of failed rows exceeds the configured maximum failed rows: "
                                  + config.maxerrors);
            }
            System.out.println("Read " + insertCount + " rows from file and successfully inserted "
                               + ackCount + " rows (final)");
            errHandler.produceFiles(ackCount, insertCount);
            close_cleanup();
            //In test junit mode we let it continue for reuse
            if (!CSVLoader.testMode) {
                System.exit(errHandler.m_errorInfo.isEmpty() ? 0 : -1);
            }
        } catch (Exception ex) {
            System.err.println("Exception Happened while loading CSV data: " + ex);
            System.exit(1);
        }
    }
1109288
public static void main(String[] args) throws IOException, InterruptedException {

        // read the options
        Properties opt = readOptions(args);
        if (opt == null)
            throw new RuntimeException("Unable to find options file path, it must be provided as an argument to the call.");

        // validate the options
        if (opt.getProperty(_OPTION_INPUT_FOLDER) == null || opt.getProperty(_OPTION_INPUT_FOLDER).isEmpty())
            throw new RuntimeException("Option " + _OPTION_INPUT_FOLDER + " is required.");
        File inputDir = new File(opt.getProperty(_OPTION_INPUT_FOLDER));
        if (!inputDir.exists())
            throw new RuntimeException("Invalid input folder.");
        Pattern incRegex = opt.getProperty(_OPTION_INPUT_REGEX_INCLUDE) == null ? null : Pattern.compile(opt.getProperty(_OPTION_INPUT_REGEX_INCLUDE));
        Pattern excRegex = opt.getProperty(_OPTION_INPUT_REGEX_EXCLUDE) == null ? null : Pattern.compile(opt.getProperty(_OPTION_INPUT_REGEX_EXCLUDE));
        String mode = opt.getProperty(_OPTION_PROCESSING_MODE);
        if (mode == null)
            throw new RuntimeException("Option " + _OPTION_PROCESSING_MODE + " is required.");
        if (!"flat-to-xml".equals(mode) && !"xml-to-flat".equals(mode))
            throw new RuntimeException("Invalid mode (must be flat-to-xml or xml-to-flat).");
        String rawErrorCodes = opt.getProperty(_OPTION_PROCESSING_ERROR_CODES);
        List<String> errorCodes = null;
        if (rawErrorCodes != null && !rawErrorCodes.isEmpty()) {
            errorCodes = new ArrayList<>();
            for (String s : StringUtils.split(rawErrorCodes, ','))
                errorCodes.add(s.trim());
        }
        int numThreads = Math.min(Runtime.getRuntime().availableProcessors() + 1, 5);
        if (opt.getProperty(_OPTION_PROCESSING_NUM_THREADS) != null && !opt.getProperty(_OPTION_PROCESSING_NUM_THREADS).isEmpty())
            numThreads = Integer.parseInt(opt.getProperty(_OPTION_PROCESSING_NUM_THREADS));
        if (opt.getProperty(_OPTION_OUTPUT_FOLDER) == null || opt.getProperty(_OPTION_OUTPUT_FOLDER).isEmpty())
            throw new RuntimeException("Option " + _OPTION_OUTPUT_FOLDER + " is required.");
        String compression = opt.getProperty(_OPTION_PROCESSING_COMPRESSION);
        if (compression != null && !compression.equals("gz") && !compression.equals("xz") && !compression.equals("none") && !compression.equals("as-input"))
            throw new RuntimeException("Invalid compression (must be gz, xz, none, or as-input).");
        File outputDir = new File(opt.getProperty(_OPTION_OUTPUT_FOLDER));
        if (!outputDir.exists())
            throw new RuntimeException("Invalid outupt folder.");
        boolean cleanCreatedFiles = opt.getProperty(_OPTION_OUTPUT_CLEAN_CREATED_FILES) == null ? false : Boolean.valueOf(opt.getProperty(_OPTION_OUTPUT_CLEAN_CREATED_FILES));
        boolean createReport = opt.getProperty(_OPTION_OUTPUT_CREATE_REPORT) == null ? false : Boolean.valueOf(opt.getProperty(_OPTION_OUTPUT_CREATE_REPORT));
        String reportName = opt.getProperty(_OPTION_OUTPUT_REPORT_NAME) == null ? "report.txt" : opt.getProperty(_OPTION_OUTPUT_REPORT_NAME);
        boolean deidentify = opt.getProperty(_OPTION_OUTPUT_DEIDENTIFY_FILES) == null ? false : Boolean.valueOf(opt.getProperty(_OPTION_OUTPUT_DEIDENTIFY_FILES));

        // gather the files to process
        List<File> toProcess = new ArrayList<>();
        File[] files = inputDir.listFiles();
        if (files != null) {
            for (File file : files) {
                if (file.isDirectory())
                    continue;
                boolean add = true;
                if (incRegex != null || excRegex != null) {
                    if (incRegex != null && !incRegex.matcher(file.getName()).matches())
                        add = false;
                    if (excRegex != null && excRegex.matcher(file.getName()).matches())
                        add = false;
                }
                if (add)
                    toProcess.add(file);
            }
        }

        // we will report the information in this collection
        Map<String, List<String>> reportData = new TreeMap<>();
        Map<String, AtomicInteger> globalCounts = new HashMap<>();
        Map<String, Set<String>> globalDetails = new HashMap<>();
        AtomicInteger globalTumorCount = new AtomicInteger();

        // create the work
        long start = System.currentTimeMillis();
        ExecutorService executor = Executors.newFixedThreadPool(numThreads);
        for (File inputFile : toProcess) {
            String outputFilename = invertFilename(inputFile, compression);
            @SuppressWarnings("ConstantConditions")
            File outputFile = new File(outputDir, outputFilename);
            if (inputFile.equals(outputFile))
                throw new RuntimeException("Was about to write output file into the input file, this can't be good!");
            if (cleanCreatedFiles)
                outputFile.deleteOnExit();
            List<String> data = new ArrayList<>();
            reportData.put(inputFile.getName(), data);
            executor.execute(new FileProcessor(inputFile, outputFile, data, cleanCreatedFiles, "flat-to-xml".equals(mode), globalCounts, globalDetails, globalTumorCount, errorCodes));
        }
        executor.shutdown();

        // wait for the work to be completed
        executor.awaitTermination(1, TimeUnit.DAYS);

        // write the report
        if (createReport) {
            Writer reportWriter = new OutputStreamWriter(new FileOutputStream(new File(outputDir, reportName)), StandardCharsets.UTF_8);

            reportWriter.write("Report created on " + new Date() + "\n\n");
            reportWriter.write("total number of files: " + formatNumber(toProcess.size()) + "\n");
            reportWriter.write("total processing time: " + formatTime(System.currentTimeMillis() - start) + "\n");
            reportWriter.write("total number of processed tumors: " + formatNumber(globalTumorCount.get()) + "\n");
            reportWriter.write("combined warnings:\n");

            int globalCount = 0;
            for (String code : NaaccrErrorUtils.getAllValidationErrors().keySet()) {
                if (errorCodes != null && !errorCodes.contains(code))
                    continue;
                int count = globalCounts.containsKey(code) ? globalCounts.get(code).get() : 0;
                if (count > 0) {
                    reportWriter.write("      " + code + ": " + formatNumber(count) + " cases\n");
                    if (globalDetails.containsKey(code)) {
                        List<String> list = new ArrayList<>(globalDetails.get(code));
                        Collections.sort(list);
                        reportWriter.write("         involved item(s): " + list.size() + " " + list + "\n");
                    }
                }
                globalCount += count;
            }
            if (globalCount == 0)
                reportWriter.write("      no warning found\n");

            for (Entry<String, List<String>> entry : reportData.entrySet()) {
                reportWriter.write("\n\n");
                reportWriter.write(deidentify ? "<de-identified file name>" : entry.getKey());
                reportWriter.write("\n");
                for (String line : entry.getValue()) {
                    reportWriter.write(line);
                    reportWriter.write("\n");
                }
            }
            reportWriter.close();
        }
    }
652786
public static void main(final String[] args) {
        String url = "http://files.grouplens.org/datasets/movielens/ml-100k.zip";
        String folder = "data3/ml-100k";
        DataDownloader dd = new DataDownloader(url, folder);
        dd.downloadAndUnzip();
    }
1070296
public static void main(String[] args) throws InterruptedException {

        try (OpenShiftClient client = new DefaultOpenShiftClient()) {

          SecurityContextConstraints scc = new SecurityContextConstraintsBuilder()
            .withNewMetadata().withName("scc").endMetadata()
            .withAllowPrivilegedContainer(true)
            .withNewRunAsUser()
            .withType("RunAsAny")
            .endRunAsUser()
            .withNewSeLinuxContext()
            .withType("RunAsAny")
            .endSeLinuxContext()
            .withNewFsGroup()
            .withType("RunAsAny")
            .endFsGroup()
            .withNewSupplementalGroups()
            .withType("RunAsAny")
            .endSupplementalGroups()
            .addToUsers("admin")
            .addToGroups("admin-group")
            .build();

          log("Created SecurityContextConstraints", client.securityContextConstraints().create(scc));

          client.close();

        } catch (KubernetesClientException e) {
          logger.error(e.getMessage(), e);
        }
    }
261657
public static void main(String[] args) throws IOException {

		long startTime = System.nanoTime();

		Stream<Path> paths = Files.walk(Paths.get(inputpath));

		paths.forEach(filePath -> {
			if (Files.isRegularFile(filePath) && filePath.toString().endsWith(".pcm")) {
				System.out.println("> PCM imported from " + filePath);

				File pcmFile = new File(filePath.toString());

				PCMLoader loader = new KMFJSONLoader();
				List<PCMContainer> pcmContainers = null;
				try {
					pcmContainers = loader.load(pcmFile);
				} catch (Exception e) {
					e.printStackTrace();
				}

				for (PCMContainer pcmContainer : pcmContainers) {
					// Get the PCM
					
					PCMInfoContainer pcmic = new PCMInfoContainer(pcmContainer);

					// for using multiple filters
					PCMCompositeFilter pFilter = new PCMCompositeFilter();
					pFilter.addFilter(new PCMPredicateMinRowProduct());
					pFilter.addFilter(new PCMPredicateMinColumnProduct());

					Boolean isNicePCM = pFilter.isSatisfiable(pcmic);

					if (writefile) {
						// now determine if the pcm is good
						if (isNicePCM) {
							KMFJSONExporter pcmExporter = new KMFJSONExporter();
							String pcmString = pcmExporter.export(pcmContainer);

							Path p = Paths.get(outputpath + filePath.getFileName());
							try {
								Files.write(p, pcmString.getBytes());
							} catch (Exception e) {
								e.printStackTrace();
							}
							System.out.println("> PCM exported to " + p);
						}
					}
				}
			}
		});

		paths.close();

		long endTime = System.nanoTime();
		System.out.println("Took " + (endTime - startTime) / (1000000) + " ms");
		System.out.println("Took " + (endTime - startTime) / (1000000000) + " s");

	}
344771
protected void launch(String[] args, String mainClass, ClassLoader classLoader)
            throws Exception {
        Runnable runner = createMainMethodRunner(mainClass, args, classLoader);
        Thread.currentThread().setContextClassLoader(classLoader);
        runner.run();
    }
1085696
public static void main(final String[] args) throws InterruptedException {
    final Thread[] threads = new Thread[100];
    for (int i = 0; i < threads.length; i++) {
      threads[i] = new Thread(new Runnable(){
        public void run() {
          for (String str : args) {
            String interned = SynchronizedInterner.globalIntern(str);
            Thread.yield();
            if (interned != str)
              throw new AssertionError("Interning failed for " + str);
          }
        }
      });
    }
    for (Thread thread : threads) {
      thread.start();
    }
    for (Thread thread : threads) {
      thread.join();
    }
  }
476490
public static void main(String[] args) throws IOException, ConfigurableException, ClassNotFoundException {
        // initialize property file
        String configFileName = null;
        ArrayList<String> cleanArgs = new ArrayList<String>();
        for (String arg : args) {
            if (arg.startsWith(configFileCmdLineKey)) {
                configFileName = arg.substring(configFileCmdLineKey.length());
            } else {
                cleanArgs.add(arg);
            }
        }

       
        args = cleanArgs.toArray(new String[cleanArgs.size()]);
        cleanArgs.clear();

        // collect properties specified on the command line
        Properties commandProperties = new Properties();
        for (String arg : args) {
            if (arg.startsWith(propCmdLineKey)) {
                String[] props = arg.substring(propCmdLineKey.length()).split("=");
                if (0 < props.length) {
                    String key = props[0];
                    String value = "";
                    if (1 < props.length) {
                        value = props[1];
                    }
                    commandProperties.put(key, value);
                }
            } else {
                cleanArgs.add(arg);
            }
        }

        args = cleanArgs.toArray(new String[cleanArgs.size()]);

        // check input parameters
        if (args.length < 1) {
            System.out.println(USAGE);
        } else {
            MatchManager mm = new MatchManager();

            Properties config = new Properties();
            if (configFileName == null) {
                config.load(Thread.currentThread().getContextClassLoader().getResource(DEFAULT_CONFIG_FILE_NAME).openStream());
            } else {
                config.load(new FileInputStream(configFileName));
            }

            if (log.isEnabledFor(Level.DEBUG)) {
                for (String k : commandProperties.stringPropertyNames()) {
                    log.debug("property override: " + k + "=" + commandProperties.getProperty(k));
                }
            }

            // override from command line
            config.putAll(commandProperties);

            mm.setProperties(config);

            if ("wntoflat".equals(args[0])) {
                mm.convertWordNetToFlat(config);
            } else if ("convert".equals(args[0])) {
                if (2 < args.length) {
                    if (3 == args.length) {
                        String inputFile = args[1];
                        String outputFile = args[2];
                        IBaseContext ctxSource = mm.loadContext(inputFile);
                        mm.renderContext(ctxSource, outputFile);
                    } else if (5 == args.length) {
                        String sourceFile = args[1];
                        String targetFile = args[2];
                        String inputFile = args[3];
                        String outputFile = args[4];

                        if (mm.getContextLoader() instanceof IContextLoader) {
                            IContext ctxSource = (IContext) mm.loadContext(sourceFile);
                            IContext ctxTarget = (IContext) mm.loadContext(targetFile);
                            IContextMapping<INode> map = mm.loadMapping(ctxSource, ctxTarget, inputFile);
                            mm.renderMapping(map, outputFile);
                        } else {
                            System.out.println("To convert a mapping, use context loaders supporting IContextLoader.");
                        }
                    }
                } else {
                    System.out.println("Not enough arguments for convert command.");
                }
            } else if ("offline".equals(args[0])) {
                if (2 < args.length) {
                    String inputFile = args[1];
                    String outputFile = args[2];
                    if (mm.getContextLoader() instanceof IContextLoader && mm.getContextRenderer() instanceof IContextRenderer) {
                        IContext ctxSource = (IContext) mm.loadContext(inputFile);
                        mm.offline(ctxSource);
                        mm.renderContext(ctxSource, outputFile);
                    } else {
                        System.out.println("To preprocess a mapping, use context loaders and renderers support IContextLoader and IContextRenderer.");
                    }
                } else {
                    System.out.println("Not enough arguments for offline command.");
                }
            } else if ("online".equals(args[0])) {
                if (3 < args.length) {
                    String sourceFile = args[1];
                    String targetFile = args[2];
                    String outputFile = args[3];
                    if (mm.getContextLoader() instanceof IContextLoader) {
                        IContext ctxSource = (IContext) mm.loadContext(sourceFile);
                        IContext ctxTarget = (IContext) mm.loadContext(targetFile);
                        IContextMapping<INode> result = mm.online(ctxSource, ctxTarget);
                        mm.renderMapping(result, outputFile);
                    } else {
                        System.out.println("To match contexts, use context loaders supporting IContextLoader.");
                    }
                } else {
                    System.out.println("Not enough arguments for online command.");
                }
            } else if ("filter".equals(args[0])) {
                if (4 < args.length) {
                    String sourceFile = args[1];
                    String targetFile = args[2];
                    String inputFile = args[3];
                    String outputFile = args[4];

                    if (mm.getContextLoader() instanceof IContextLoader) {
                        IContext ctxSource = (IContext) mm.loadContext(sourceFile);
                        IContext ctxTarget = (IContext) mm.loadContext(targetFile);
                        IContextMapping<INode> mapInput = mm.loadMapping(ctxSource, ctxTarget, inputFile);
                        IContextMapping<INode> mapOutput = mm.filterMapping(mapInput);
                        mm.renderMapping(mapOutput, outputFile);
                    } else {
                        System.out.println("To filter a mapping, use context loaders supporting IContextLoader.");
                    }
                } else {
                    System.out.println("Not enough arguments for mappingFilter command.");
                }
            } else {
                System.out.println("Unrecognized command.");
            }
        }
    }
500725
public static void main(final String[] args) throws IOException, InjectionException {
    final ClientProtocol.DriverClientConfiguration driverClientConfigurationProto;
    if (args.length > 0) {
      final String content = new String(Files.readAllBytes(Paths.get(args[0])));
      final ClientProtocol.DriverClientConfiguration.Builder driverClientConfigurationProtoBuilder =
          ClientProtocol.DriverClientConfiguration.newBuilder();
      JsonFormat.parser()
          .usingTypeRegistry(JsonFormat.TypeRegistry.getEmptyTypeRegistry())
          .merge(content, driverClientConfigurationProtoBuilder);
      driverClientConfigurationProto = driverClientConfigurationProtoBuilder.build();
      final int port = (args.length == 2) ? Integer.parseInt(args[1]) : 0;
      final LauncherStatus status = submit(port, driverClientConfigurationProto);
      LOG.log(Level.INFO, "Status: {0}", status);
    } else {
      LOG.log(Level.SEVERE, ClientLauncher.class.getName() +
          " accepts single required argument referencing a file that contains a " +
          "client protocol buffer driver configuration");
      System.exit(1);
    }
  }
1083569
public static void main(String[] args) throws Exception {
    parseArgs(args);

    GenMunger rawMunger;
    rawMunger = (hex.genmodel.GenMunger) Class.forName(assemblyClassName).newInstance();

    BufferedReader input = new BufferedReader(new FileReader(inputCSVFileName));
    BufferedWriter output = new BufferedWriter(new FileWriter(outputCSVFileName));

    // Emit outputCSV column names.
    String[] rawHeader = rawMunger.outNames();
    StringBuilder header = new StringBuilder();
    for(int i=0;i<rawHeader.length;++i) {
      header.append("\"").append(rawHeader[i]).append("\"");
      if( i < rawHeader.length - 1 ) header.append(",");
    }
    output.write(header.toString());
    output.write("\n");

    // Loop over inputCSV one row at a time.
    int lineNum = 0;
    String line;
    try {
      while ((line = input.readLine()) != null) {
        lineNum++;

        // skip the header.
        if (lineNum == 1)
          continue;

        // Parse the CSV line.  Somewhat handles quoted commas.  But this ain't no parser test!
        RowData row;
        try {
          row = parseDataRow(line, rawMunger);
        } catch( NumberFormatException nfe) {
          nfe.printStackTrace();
          System.out.println("Failed to parse row: " + lineNum );
          throw new RuntimeException();
        }
        RowData mungedRow = rawMunger.fit(row);

        for(int i=0; i<rawMunger.outNames().length;++i) {
          Object val = mungedRow==null?Double.NaN:mungedRow.get(rawMunger.outNames()[i]);
          if( val instanceof Double ) output.write(String.valueOf(val));
          else                        output.write("\"" + val + "\"");
          if( i < rawMunger.outNames().length - 1) output.write(",");
        }
        output.write("\n");
      }
    }
    catch (Exception e) {
      System.out.println("Caught exception on line " + lineNum);
      System.out.println("");
      e.printStackTrace();
      System.exit(1);
    }
    finally {

      // Clean up.
      output.close();
      input.close();
    }

    // Predictions were successfully generated.  Calling program can now compare them with something.
    System.exit(0);
  }
773262
public static void main(String[] args) {
        if (args.length != 2) {
            System.err.println("Please specify dir or filename | output file location");
            return;
        }

        StopwordsGenerator stopwordsGenerator = new StopwordsGenerator();

        File file = new File(args[0]);

        if (file.isFile()) {
            WikiSingleWordCount.generateFromFile(file, stopwordsGenerator);
        } else {
            File[] files = file.listFiles();
            Arrays.stream(files).parallel()
                    .filter(File::isFile)
                    .forEach(f -> WikiSingleWordCount.generateFromFile(f, stopwordsGenerator));
        }

        stopwordsGenerator.normalize();
        List<Map.Entry<String, Double>> result = stopwordsGenerator.getProbability()
                .entrySet().stream()
                .sorted((o1, o2) -> o2.getValue().compareTo(o1.getValue()))
                .collect(Collectors.toList());
        stopwordsGenerator.writeFile(args[1], result);
    }
263641
public static void main(String[] args) throws IOException, InterruptedException {

        if (args.length < 4 || args.length > 5) {
            System.out.println(
                    "USAGE: HelloWorldServerTls host port certChainFilePath privateKeyFilePath " +
                    "[trustCertCollectionFilePath]\n  Note: You only need to supply trustCertCollectionFilePath if you want " +
                    "to enable Mutual TLS.");
            System.exit(0);
        }

        final HelloWorldServerTls server = new HelloWorldServerTls(args[0],
                Integer.parseInt(args[1]),
                args[2],
                args[3],
                args.length == 5 ? args[4] : null);
        server.start();
        server.blockUntilShutdown();
    }
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();
        }
    }
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"));
    }
240793
public static void main(String[] args) throws InterruptedException {

    Microservices gateway =
        Microservices.builder()
            .discovery(ScalecubeServiceDiscovery::new)
            .transport(ServiceTransports::rsocketServiceTransport)
            .startAwait();

    Microservices ms =
        Microservices.builder()
            .discovery(
                serviceEndpoint -> serviceDiscovery(serviceEndpoint, gateway.discovery().address()))
            .transport(ServiceTransports::rsocketServiceTransport)
            .services(new DefaultMarketDataService())
            .startAwait();

    MarketDataService marketService = ms.call().api(MarketDataService.class);

    marketService.orderBook().subscribe(Example1::print);

    Executors.newScheduledThreadPool(1)
        .scheduleAtFixedRate(
            () -> {
              try {

                if (RANDOM.nextInt(2) == 1) {
                  marketService
                      .processOrder(
                          new OrderRequest(
                              new Order(
                                  new PriceLevel(Side.BUY, RANDOM.nextInt(10) + 1), // prices
                                  System.currentTimeMillis(),
                                  Long.valueOf(RANDOM.nextInt(110) + 1 + "")), // units
                              INSTRUMENT))
                      .block();
                } else {
                  marketService
                      .processOrder(
                          new OrderRequest(
                              new Order(
                                  new PriceLevel(Side.SELL, RANDOM.nextInt(10) + 1), // prices
                                  System.currentTimeMillis(),
                                  Long.valueOf(RANDOM.nextInt(70) + 1 + "")), // units
                              INSTRUMENT))
                      .block();
                }
              } catch (Throwable ex) {
                ex.printStackTrace();
              }
            },
            3,
            3,
            TimeUnit.MILLISECONDS);

    Thread.currentThread().join();
  }
878649
public static void main(String[] args) throws IOException {
		CSLToolContext ctx = CSLToolContext.enter();
		try {
			ctx.setToolName("citeproc-java");
			CSLTool tool = new CSLTool();
			int exitCode;
			try {
				exitCode = tool.run(args, new StandardInputReader(),
						new PrintWriter(System.out));
			} catch (OptionParserException e) {
				tool.error(e.getMessage());
				exitCode = 1;
			}
			if (exitCode != 0) {
				System.exit(exitCode);
			}
		} finally {
			CSLToolContext.exit();
		}
	}
42799
public static void main(final String[] args)
      throws IOException, JDOMException {
    CLI cmdLine = new CLI();
    cmdLine.parseCLI(args);
  }