Tests the code.
@param args
327379
public static void main(String args[])
        { 
        int j;

        MersenneTwisterFast r;

        // CORRECTNESS TEST
        // COMPARE WITH http://www.math.keio.ac.jp/matumoto/CODES/MT2002/mt19937ar.out
        
        r = new MersenneTwisterFast(new int[]{0x123, 0x234, 0x345, 0x456});
        System.out.println("Output of MersenneTwisterFast with new (2002/1/26) seeding mechanism");
        for (j=0;j<1000;j++)
            {
            // first, convert the int from signed to "unsigned"
            long l = r.nextInt();
            if (l < 0 ) l += 4294967296L;  // max int value
            String s = String.valueOf(l);
            while(s.length() < 10) s = " " + s;  // buffer
            System.out.print(s + " ");
            if (j%5==4) System.out.println();       
            }

        // SPEED TEST

        final long SEED = 4357;

        int xx; long ms;
        System.out.println("\nTime to test grabbing 100000000 ints");
          
        Random rr = new Random(SEED);
        xx = 0;
        ms = System.currentTimeMillis();
        for (j = 0; j < 100000000; j++)
            xx += rr.nextInt();
        System.out.println("java.util.Random: " + (System.currentTimeMillis()-ms) + "          Ignore this: " + xx);
        
        r = new MersenneTwisterFast(SEED);
        ms = System.currentTimeMillis();
        xx=0;
        for (j = 0; j < 100000000; j++)
            xx += r.nextInt();
        System.out.println("Mersenne Twister Fast: " + (System.currentTimeMillis()-ms) + "          Ignore this: " + xx);
        
        // TEST TO COMPARE TYPE CONVERSION BETWEEN
        // MersenneTwisterFast.java AND MersenneTwister.java
          
        System.out.println("\nGrab the first 1000 booleans");
        r = new MersenneTwisterFast(SEED);
        for (j = 0; j < 1000; j++)
            {
            System.out.print(r.nextBoolean() + " ");
            if (j%8==7) System.out.println();
            }
        if (!(j%8==7)) System.out.println();
          
        System.out.println("\nGrab 1000 booleans of increasing probability using nextBoolean(double)");
        r = new MersenneTwisterFast(SEED);
        for (j = 0; j < 1000; j++)
            {
            System.out.print(r.nextBoolean((j/999.0)) + " ");
            if (j%8==7) System.out.println();
            }
        if (!(j%8==7)) System.out.println();
          
        System.out.println("\nGrab 1000 booleans of increasing probability using nextBoolean(float)");
        r = new MersenneTwisterFast(SEED);
        for (j = 0; j < 1000; j++)
            {
            System.out.print(r.nextBoolean((j/999.0f)) + " ");
            if (j%8==7) System.out.println();
            }
        if (!(j%8==7)) System.out.println();
          
        byte[] bytes = new byte[1000];
        System.out.println("\nGrab the first 1000 bytes using nextBytes");
        r = new MersenneTwisterFast(SEED);
        r.nextBytes(bytes);
        for (j = 0; j < 1000; j++)
            {
            System.out.print(bytes[j] + " ");
            if (j%16==15) System.out.println();
            }
        if (!(j%16==15)) System.out.println();
        
        byte b;
        System.out.println("\nGrab the first 1000 bytes -- must be same as nextBytes");
        r = new MersenneTwisterFast(SEED);
        for (j = 0; j < 1000; j++)
            {
            System.out.print((b = r.nextByte()) + " ");
            if (b!=bytes[j]) System.out.print("BAD ");
            if (j%16==15) System.out.println();
            }
        if (!(j%16==15)) System.out.println();

        System.out.println("\nGrab the first 1000 shorts");
        r = new MersenneTwisterFast(SEED);
        for (j = 0; j < 1000; j++)
            {
            System.out.print(r.nextShort() + " ");
            if (j%8==7) System.out.println();
            }
        if (!(j%8==7)) System.out.println();

        System.out.println("\nGrab the first 1000 ints");
        r = new MersenneTwisterFast(SEED);
        for (j = 0; j < 1000; j++)
            {
            System.out.print(r.nextInt() + " ");
            if (j%4==3) System.out.println();
            }
        if (!(j%4==3)) System.out.println();

        System.out.println("\nGrab the first 1000 ints of different sizes");
        r = new MersenneTwisterFast(SEED);
        int max = 1;
        for (j = 0; j < 1000; j++)
            {
            System.out.print(r.nextInt(max) + " ");
            max *= 2;
            if (max <= 0) max = 1;
            if (j%4==3) System.out.println();
            }
        if (!(j%4==3)) System.out.println();

        System.out.println("\nGrab the first 1000 longs");
        r = new MersenneTwisterFast(SEED);
        for (j = 0; j < 1000; j++)
            {
            System.out.print(r.nextLong() + " ");
            if (j%3==2) System.out.println();
            }
        if (!(j%3==2)) System.out.println();

        System.out.println("\nGrab the first 1000 longs of different sizes");
        r = new MersenneTwisterFast(SEED);
        long max2 = 1;
        for (j = 0; j < 1000; j++)
            {
            System.out.print(r.nextLong(max2) + " ");
            max2 *= 2;
            if (max2 <= 0) max2 = 1;
            if (j%4==3) System.out.println();
            }
        if (!(j%4==3)) System.out.println();
          
        System.out.println("\nGrab the first 1000 floats");
        r = new MersenneTwisterFast(SEED);
        for (j = 0; j < 1000; j++)
            {
            System.out.print(r.nextFloat() + " ");
            if (j%4==3) System.out.println();
            }
        if (!(j%4==3)) System.out.println();

        System.out.println("\nGrab the first 1000 doubles");
        r = new MersenneTwisterFast(SEED);
        for (j = 0; j < 1000; j++)
            {
            System.out.print(r.nextDouble() + " ");
            if (j%3==2) System.out.println();
            }
        if (!(j%3==2)) System.out.println();

        System.out.println("\nGrab the first 1000 gaussian doubles");
        r = new MersenneTwisterFast(SEED);
        for (j = 0; j < 1000; j++)
            {
            System.out.print(r.nextGaussian() + " ");
            if (j%3==2) System.out.println();
            }
        if (!(j%3==2)) System.out.println();
        
        }
6950
public static void main(String[] args) {
    final PrintWriter out = new PrintWriter(System.out);
    final PrintWriter err = new PrintWriter(System.err);
    final int code = Launcher.main2(out, err, Arrays.asList(args));
    System.exit(code);
  }
994245
public static void main(String[] args){

    // -- STRESS TEST THREADS --
    Runnable[] tasks = new Runnable[1000];
    for(int i=0; i<tasks.length; i++){
      final int fI = i;
      tasks[i] = new Runnable(){
        public void run(){
          startTrack("Runnable " + fI);
          log(Thread.currentThread().getId());
          log("message " + fI + ".1");
          log("message " + fI + ".2");
          log("message " + fI + ".3");
          log(FORCE,"message " + fI + ".4");
          log("message " + fI + ".5");
          forceTrack("Runnable " + fI + ".1");
          endTrack("Runnable " + fI + ".1");
          forceTrack("Runnable " + fI + ".2");
          log("a message");
          endTrack("Runnable " + fI + ".2");
          forceTrack("Runnable " + fI + ".3");
          log("a message");
          log(FORCE,"A forced message");
          endTrack("Runnable " + fI + ".3");
          endTrack("Runnable " + fI);
        }
      };
    }
    startTrack("Wrapper");
    for(int i=0; i<100; i++){
      Util.threadAndRun(new ArrayIterable(tasks), 100);
    }
    endTrack("Wrapper");
    System.exit(1);
    
    
    forceTrack("Track 1");
    log("tag", ERR, "hello world");
    startTrack("Hidden");
    startTrack("Subhidden");
    endTrack("Subhidden");
    endTrack("Hidden");
    startTrack(FORCE, "Shown");
    startTrack(FORCE,"Subshown");
    endTrack("Subshown");
    endTrack("Shown");
    log("^shown should have appeared above");
    startTrack("Track 1.1");
    log(WARN, "some", "something in 1.1");
    log("some",ERR,"something in 1.1");
    log(FORCE,"some",WARN,"something in 1.1");
    log(WARN,FORCE,"some","something in 1.1");
    logf("format string %s then int %d", "hello", 7);
    endTrack("Track 1.1");
    startTrack();
    log("In an anonymous track");
    endTrack();
    endTrack("Track 1");
    log("outside of a track");
    log("these","channels","should","be","in",DBG,"alphabetical","order", "a log item with lots of channels");
    log("these","channels","should","be","in",DBG,"alphabetical","order", "a log item\nthat spans\nmultiple\nlines");
    log(DBG,"a last log item");
    log(ERR,null);

    //--Repeated Records
    RedwoodConfiguration.current().collapseExact().apply();
    //(simple case)
    forceTrack("Strict Equality");
    for(int i=0; i<100; i++){ log("this is a message"); }
    endTrack("Strict Equality");
    //(in-track change)
    forceTrack("Change");
    for(int i=0; i<10; i++){ log("this is a message"); }
    for(int i=0; i<10; i++){ log("this is a another message"); }
    for(int i=0; i<10; i++){ log("this is a third message"); }
    for(int i=0; i<5; i++){ log("this is a fourth message"); }
    log(FORCE,"this is a fourth message");
    for(int i=0; i<5; i++){ log("this is a fourth message"); }
    log("^middle 'fourth message' was forced");
    endTrack("Change");
    //(suppress tracks)
    forceTrack("Repeated Tracks");
    for(int i=0; i<100; i++){ startTrack("Track type 1"); log("a message"); endTrack("Track type 1"); }
    for(int i=0; i<100; i++){ startTrack("Track type 2"); log("a message"); endTrack("Track type 2"); }
    for(int i=0; i<100; i++){ startTrack("Track type 3"); log("a message"); endTrack("Track type 3"); }
    startTrack("Track type 3"); startTrack("nested"); log(FORCE,"this should show up"); endTrack("nested"); endTrack("Track type 3");
    for(int i=0; i<5; i++){ startTrack("Track type 3"); log(FORCE,"this should show up"); endTrack("Track type 3"); }
    log(WARN,"The log message 'this should show up' should show up 6 (5+1) times above");
    endTrack("Repeated Tracks");
    //(tracks with invisible things)
    Redwood.hideOnlyChannels(DBG);
    forceTrack("Hidden Subtracks");
    for(int i=0; i<100; i++){
      startTrack("Only has debug messages");
      log(DBG,"You shouldn't see me");
      endTrack("Only has debug messages");
    }
    log("You shouldn't see any other messages or 'skipped tracks' here");
    endTrack("Hidden Subtracks");
    //(fuzzy repeats)
    RedwoodConfiguration.standard().apply();
    RedwoodConfiguration.current().collapseApproximate().apply();
    forceTrack("Fuzzy Equality");
    for(int i=0; i<100; i++){ log("iter " + i + " ended with value " + (-34587292534.0+Math.sqrt(i)*3000000000.0)); }
    endTrack("Fuzzy Equality");
    forceTrack("Fuzzy Equality (timing)");
    for(int i=0; i<100; i++){
      log("iter " + i + " ended with value " + (-34587292534.0+Math.sqrt(i)*3000000000.0));
      try {
        Thread.sleep(50);
      } catch (InterruptedException e) { }
    }
    endTrack("Fuzzy Equality (timing)");

    //--Util Helper
    Util.log("hello world");
    Util.log(DBG, "hello world");
    Util.debug("hello world");
    Util.debug("atag", "hello world");

    //--Show Name at Track Finish
    Redwood.getHandler(ConsoleHandler.class).minLineCountForTrackNameReminder = 5;
    startTrack("Long Track");
    for(int i=0; i<10; i++){ log(FORCE,"contents of long track"); }
    endTrack("Long TracK");
    startTrack("Long Track");
    startTrack("But really this is the long one");
    try {
      Thread.sleep(3000);
    } catch (InterruptedException e) { }
    for(int i=0; i<10; i++){ log(FORCE,"contents of long track"); }
    endTrack("But really this is the long one");
    endTrack("Long TracK");
    Redwood.getHandler(ConsoleHandler.class).minLineCountForTrackNameReminder = 50;

    //--Multithreading
    ExecutorService exec = Executors.newFixedThreadPool(10);
    startThreads("name");
    for(int i=0; i<50; i++){
      final int theI = i;
      exec.execute(new Runnable(){
        public void run() {
          startTrack("Thread " + theI + " (" + Thread.currentThread().getId() + ")");
          for(int time=0; time<5; time++){
            log("tick " + time + " from " + theI + " (" + Thread.currentThread().getId() + ")");
            try {
              Thread.sleep(50);
            } catch (Exception e) {}
          }
          endTrack("Thread " + theI + " (" + Thread.currentThread().getId() + ")");
          finishThread();
        }
      });

    }
    exec.shutdown();
    try {
      exec.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS);
    } catch (InterruptedException e) {}
    endThreads("name");

    //--System Streams
    Redwood.captureSystemStreams(true, true);
    System.out.println("Hello World");
    System.err.println("This is an error!");

    //--Neat Exit
    RedwoodConfiguration.standard().collapseExact().apply();
    //(on close)
    for(int i=0; i<100; i++){
//      startTrack();
      log("stuff!");
//      endTrack();
    }
    Util.exit(0);
    //(on exception)
    System.out.println("I'm going to exception soon (on purpose)");
    RedwoodConfiguration.current().neatExit().apply();
    startTrack("I should close");
    log(FORCE,"so I'm nonempty...");
    try {
      Thread.sleep(3000);
    } catch (InterruptedException e) { }
		throw new IllegalArgumentException();
  }
356524
public static void main(String[] args) {
		if (args.length > 0) {
			System.out.printf("%s\n", getFullVersion());
		} else {
			System.out.println(VERSION);
		}
	}
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());

  }
1329464
public static void main(String args[])
    {
        BaseApplet.main(args);
        ChatApplet applet = (ChatApplet)ChatApplet.getSharedInstance();
        if (applet == null)
            applet = new ChatApplet(args);
        new JBaseFrame("Test", applet);
    }
398406
public static void main(String[] args) {
        int exitCode = 0;
        final App app = new App();
        exitCode = app.run(args);
        LOGGER.debug("Exit code: {}", exitCode);
        System.exit(exitCode);
    }
92048
public static void main(String[] args) {

		ListRepo listRepo = new ListRepo();
		try {
			listRepo.run(args);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
979198
public static void main(final String[] args) {
    GUIUtil.logUncaughtExceptions(LOG);
    GUIUtil.setLookAndFeel();
    OutputStep.setDefaultHandlerVisualizer();

    javax.swing.SwingUtilities.invokeLater(new Runnable() {
      @Override
      public void run() {
        try {
          final MultiStepGUI gui = new MultiStepGUI();
          gui.run();
          if(args != null && args.length > 0) {
            gui.setParameters(new SerializedParameterization(args));
          }
          else {
            gui.setParameters(new SerializedParameterization());
          }
        }
        catch(Exception | Error e) {
          // Restore error handler, as the GUI is likely broken.
          LoggingConfiguration.replaceDefaultHandler(new CLISmartHandler());
          LOG.exception(e);
        }
      }
    });
  }
84139
public static void main(final String[] args) {
		BenchmarkOutputParser parser = new BenchmarkOutputParser(FRAMEWORKS.keySet());
		HtmlDiagramRenderer renderer = new HtmlDiagramRenderer(FRAMEWORKS);
		renderer.output(parser.parse(OUTPUT_FILE));
	}
86867
public static void main(String[] args)
	{
		CommandLineRemoteRunner runner = new CommandLineRemoteRunner();
		LoggingMonitor monitor = new LoggingMonitor(System.out, System.err);
		runner.setMonitor(monitor);

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

			if (e.getCause() != null)
			{
				System.err.println("Caused by:");
				e.getCause().printStackTrace(System.err);
			}

			System.exit(1);
		}
		catch (Throwable t)
		{
			monitor.exceptionOccured(t);
			System.exit(1);
		}
	}
806321
public static void main(String[] args) {
        ServerSchemaGenCommand util = new ServerSchemaGenCommand();
        int rc = util.generateServerSchema(args);
        System.exit(rc);
    }
586163
public static void main(String[] args) {
		if (args == null || args.length == 0) {
			server = com.jfinal.server.jetty.ServerFactory.getServer();
			server.start();
			return ;
		}
		
		// for Eclipse
		if (args.length == 4) {
			String webAppDir = args[0];
			int port = Integer.parseInt(args[1]);
			String context = args[2];
			int scanIntervalSeconds = Integer.parseInt(args[3]);
			server = com.jfinal.server.jetty.ServerFactory.getServer(webAppDir, port, context, scanIntervalSeconds);
			server.start();
			return ;
		}
		
		// for IDEA
		if (args.length == 3) {
			start(args[0], Integer.parseInt(args[1]), args[2]);
			return ;
		}
		
		throw new RuntimeException("Boot parameter error. The right parameter like this: src/main/webapp 80 / 5");
	}
421200
public static void main(String[] args) {
        Settings settings = new Settings();
        new JCommander(settings, args);

        if (!settings.isGuiSupressed()) {
            OkapiUI okapiUi = new OkapiUI();
            okapiUi.setVisible(true);
        } else {
            int returnValue;
            
            returnValue = commandLine(settings);
            
            if (returnValue != 0) {
                System.out.println("An error occurred");
            }
        }
    }
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);
    }
945508
public static void main(final String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                Utils4Swing.initSystemLookAndFeel();
                Utils4Swing.createShowAndPosition("Test Progress Dialog",
                        new FileCopyProgressPanel(), true, new ScreenCenterPositioner());
            }
        });
    }
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();
	}