Main.

@param args command line arguments
420528
public static void main(final String[] args) {
        Switch about = new Switch("a", "about", "display about message");
        Switch help = new Switch("h", "help", "display help message");
        FileArgument bedFile = new FileArgument("o", "bed-file", "output BED file, default stdout", false);
        IntegerArgument n = new IntegerArgument("n", "n", "number of BED records to generate, default " + DEFAULT_N, false);
        IntegerArgument size = new IntegerArgument("s", "size", "chromosome size, default " + DEFAULT_SIZE, false);
        StringArgument chrom = new StringArgument("c", "chrom", "chromosome name, default " + DEFAULT_CHROM, false);
        DoubleArgument meanLength = new DoubleArgument("l", "mean-length", "mean length, default " + DEFAULT_MEAN_LENGTH, false);
        DoubleArgument lengthVariation = new DoubleArgument("v", "length-variation", "length variation, default " + DEFAULT_LENGTH_VARIATION, false);
        IntegerArgument seed = new IntegerArgument("z", "seed", "random number seed, default relates to current time", false);

        ArgumentList arguments = new ArgumentList(about, help, bedFile, n, size, chrom, meanLength, lengthVariation, seed);
        CommandLine commandLine = new CommandLine(args);

        GenerateBed generateBed = null;
        try
        {
            CommandLineParser.parse(commandLine, arguments);
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }

            RandomGenerator random = seed.wasFound() ? new MersenneTwister(seed.getValue()) : new MersenneTwister();
            double lv = Math.max(NO_VARIATION, lengthVariation.getValue(DEFAULT_LENGTH_VARIATION));
            RealDistribution length = new NormalDistribution(random, meanLength.getValue(DEFAULT_MEAN_LENGTH), lv, NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);

            generateBed = new GenerateBed(bedFile.getValue(), n.getValue(DEFAULT_N), size.getValue(DEFAULT_SIZE), chrom.getValue(DEFAULT_CHROM), random, length);
        }
        catch (CommandLineParseException e) {
            Usage.usage(USAGE, e, commandLine, arguments, System.err);
            System.exit(-1);
        }
        try {
            System.exit(generateBed.call());
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
522297
public static void main(String[] args)
   {
      final int argsLength = args.length;
      if (argsLength < 1)
      {
         usage();
         System.exit(OTHER);
      }
      String rarFile = "";
      String[] cps = null;
      boolean stdout = false;
      String reportFile = "";

      for (int i = 0; i < argsLength; i++)
      {
         String arg = args[i];
         if (arg.equals(ARGS_CP))
         {
            cps = args[++i].split(System.getProperty("path.separator"));
         }
         else if (arg.equals(ARGS_STDOUT))
         {
            stdout = true;
         }
         else if (arg.equals(ARGS_OUT))
         {
            reportFile = args[++i];
         }
         else if (arg.endsWith("rar"))
         {
            rarFile = arg;
         }
         else
         {
            usage();
            System.exit(OTHER);
         }
      }
      int exitCode = rarInfo(rarFile, cps, stdout, reportFile);
      if (exitCode == SUCCESS)
      {
         System.out.println("Done.");
      }
      System.exit(exitCode);
   }
1028395
public static void main(String[] args) {
    BasicConfigurator.configure(new ConsoleAppender(
            new PatternLayout("%d [%-25t] %-5p: %m%n")));

    CmdLineParser parser = new CmdLineParser();
    CmdLineParser.Option help = parser.addBooleanOption('h', "help");
    CmdLineParser.Option output = parser.addStringOption('o', "output");
    CmdLineParser.Option iface = parser.addStringOption('i', "iface");
    CmdLineParser.Option seedTime = parser.addIntegerOption('s', "seed");
    CmdLineParser.Option maxUpload = parser.addDoubleOption('u', "max-upload");
    CmdLineParser.Option maxDownload = parser.addDoubleOption('d', "max-download");

    try {
      parser.parse(args);
    } catch (CmdLineParser.OptionException oe) {
      System.err.println(oe.getMessage());
      usage(System.err);
      System.exit(1);
    }

    // Display help and exit if requested
    if (Boolean.TRUE.equals((Boolean) parser.getOptionValue(help))) {
      usage(System.out);
      System.exit(0);
    }

    String outputValue = (String) parser.getOptionValue(output,
            DEFAULT_OUTPUT_DIRECTORY);
    String ifaceValue = (String) parser.getOptionValue(iface);
    int seedTimeValue = (Integer) parser.getOptionValue(seedTime, -1);

    String[] otherArgs = parser.getRemainingArgs();
    if (otherArgs.length != 1) {
      usage(System.err);
      System.exit(1);
    }

    SimpleClient client = new SimpleClient();
    try {
      Inet4Address iPv4Address = getIPv4Address(ifaceValue);
      File torrentFile = new File(otherArgs[0]);
      File outputFile = new File(outputValue);

      client.downloadTorrent(
              torrentFile.getAbsolutePath(),
              outputFile.getAbsolutePath(),
              iPv4Address);
      if (seedTimeValue > 0) {
        Thread.sleep(seedTimeValue * 1000);
      }

    } catch (Exception e) {
      logger.error("Fatal error: {}", e.getMessage(), e);
      System.exit(2);
    } finally {
      client.stop();
    }
  }
201363
public static void main(String[] args) {
    EventQueue.invokeLater(new Runnable() {
      public void run() {
        try {
          GraphicalValidator window = new GraphicalValidator();
          window.frame.setVisible(true);
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    });
  }
1312489
public static void main(String... args) {
        DocLint dl = new DocLint();
        try {
            dl.run(args);
        } catch (BadArgs e) {
            System.err.println(e.getMessage());
            System.exit(1);
        } catch (IOException e) {
            System.err.println(dl.localize("dc.main.ioerror", e.getLocalizedMessage()));
            System.exit(2);
        }
    }
563395
public static void main(String[] args) {
    final AlluxioLogServerProcess process = new AlluxioLogServerProcess(args[0]);
    ProcessUtils.stopProcessOnShutdown(process);
    ProcessUtils.run(process);
  }
243019
public static void main(String[] args) throws Exception {
      Shell shell = new ShellImpl();
      shell.init(args);
      shell.run();
      System.exit(0);
   }
287366
public static void main(String[] args) {
        ConsoleWrapper console = new ConsoleWrapper(System.console(), System.err);

        // Create the SpringBootUtility and register tasks
        SpringBootUtility util = new SpringBootUtility(console, System.out, System.err);
        IFileUtility fileUtil = new FileUtility();
        util.registerTask(new ThinAppTask(fileUtil, SCRIPT_NAME));

        // Kick everything off
        int rc = util.runProgram(args).getReturnCode();
        System.exit(rc);
    }
1043073
public static void main(String[] args) {
    validateArguments(args);

    EchoClient echoClient = newEchoClient(lenientParsePort(args[0]));

    for (int index = 1; index < args.length; index++) {
      System.out.println(echoClient.sendMessage(args[index]));
    }
  }
1337013
public static void main(String[] args) {
        boolean success = Orchid.getInstance().start(
                StandardModule.builder().args(args).build()
        );
        System.exit((success) ? 0 : 1);
    }
231071
public static void main(final String[] args) {
        Switch help = new Switch("h", "help", "display help message");
        FileArgument aInputFile = new FileArgument("a", "a-input-file", "A input BED file, default stdin", false);
        FileArgument bInputFile = new FileArgument("b", "b-input-file", "B input BED file", true);
        FileArgument outputFile = new FileArgument("o", "output-file", "output BED file, default stdout", false);
        StringArgument strategy = new StringArgument("s", "strategy", "strategy { range-list, range-set, centered-range-tree, r-tree, r-star-tree }, default range-set", false);

        ArgumentList arguments = new ArgumentList(help, aInputFile, bInputFile, outputFile, strategy);
        CommandLine commandLine = new CommandLine(args);

        IntersectBed intersectBed = null;
        try
        {
            CommandLineParser.parse(commandLine, arguments);
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            intersectBed = new IntersectBed(aInputFile.getValue(), bInputFile.getValue(), outputFile.getValue(), strategies.get(strategy.getValue(DEFAULT_STRATEGY)));
        }
        catch (CommandLineParseException | NullPointerException e) {
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            Usage.usage(USAGE, e, commandLine, arguments, System.err);
            System.exit(-1);
        }
        try {
            System.exit(intersectBed.call());
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
316853
public static void main(String... args) {
        CommandLineRunner runner = new CommandLineRunner();

        try {
            runner.run(args);
        } catch (Exception t) {
            System.err.println(t.getMessage());
            System.err.println("Try '--help' for more information.");

            t.printStackTrace(System.err);

            System.exit(1);
        }

        System.exit(0);
    }
108893
public static void main(String[] args) {
        DEBUG_MODE_V = DebugMode.SCREEN;
        Log.initScreen();
        printVerbose(null, null);
    }
202613
public static void main(final String[] args) {
        Switch about = new Switch("a", "about", "display about message");
        Switch help = new Switch("h", "help", "display help message");
        FileArgument fastaFile = new FileArgument("i", "fasta-file", "input hard-masked FASTA file, default stdin", false);
        FileArgument bedFile = new FileArgument("o", "bed-file", "output BED file, default stdout", false);

        ArgumentList arguments = new ArgumentList(about, help, fastaFile, bedFile);
        CommandLine commandLine = new CommandLine(args);

        MaskedToBed maskedToBed = null;
        try {
            CommandLineParser.parse(commandLine, arguments);
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            maskedToBed = new MaskedToBed(fastaFile.getValue(), bedFile.getValue());
        }
        catch (CommandLineParseException e) {
            Usage.usage(USAGE, e, commandLine, arguments, System.err);
            System.exit(-1);
        }
        try {
            System.exit(maskedToBed.call());
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
1234174
public static void main(String[] args) {
        System.out.println("Hello World!");
        /*Executor exec = Executors.newCachedThreadPool();
        for(int i = 0; i < 20; i++) {
            final int v = i;
            exec.execute(new Runnable() {
                @Override
                public void run() {
                    System.out.println(v);
                }
            });
        }*/


        LongStream.rangeClosed(0, 5).map(n -> n * n).forEach(s -> System.out.print(s + " "));

    }
102892
public static void main(String[] args) {
		PrintStream out = System.out;
		if (args.length > 0) {
			try {
				out = new PrintStream(new File(args[0]));
			} catch (FileNotFoundException e) {
				System.out.printf(ERR_FILE, args[0]);
			}
		}
		MBeanScanner mBeanScanner = new MBeanScanner();
		List<Config> configs = mBeanScanner.scan();
		ConfigWriter cw;
		cw = new ConfigWriter(out, configs);
		cw.write();
	}
807455
public static void main(String[] args) {

    ArgumentProcessor<Configuration> argProcessor = new ArgumentProcessor<Configuration>("");

    argProcessor.addOption("verbose", 'V', new BooleanFieldOption<Configuration>("verbose"));
    argProcessor.addOption("host", 'h', new StringFieldOption<Configuration>("host"));
    argProcessor.addOption("username", 'u', new StringFieldOption<Configuration>("username"));
    argProcessor.addOption("password", 'p', new StringFieldOption<Configuration>("password"));

    argProcessor.addCommand("verify", new VerifyCommand());
    argProcessor.addCommand("sync", new SynchronizeCommand());
    argProcessor.addCommand("idle", new SetIdleTimeCommand());
    argProcessor.addCommand("script", new ScriptCommand());
    argProcessor.addCommand("connect", new ConnectCommand());

    argProcessor.setDefaultCommand(UnrecognizedCommand.getInstance());

    argProcessor.process(args, new Configuration());

  }