Outputs all class names below "moa" either to stdout or to the
file provided as first argument.

@param args optional file for storing the classnames
@throws Exception if writing to file fails
436930
public static void main(String[] args) throws Exception {
        initCache();
        List<String> allClassnames = getAllClassNames();
        PrintStream out = System.out;
        if (args.length > 0)
            out = new PrintStream(new File(args[0]));
        Collections.sort(allClassnames);
        for (String clsname: allClassnames)
            out.println(clsname);
        out.flush();
        if (args.length > 0)
            out.close();
    }
443393
public static void main(String[] args) throws ClassNotFoundException, IOException {
      // When run off the command-line or a build script, this program takes in two arguments: the path containing
      // class files to scan, and the output file to generate.
      long startTime = System.nanoTime();
      String path = args[0];
      String outputFile = args[1];

      System.out.printf(" [ComponentMetadataPersister] Starting component metadata generation.  Scanning classes in %s%n", path);

      ComponentMetadataRepo repo = new ComponentMetadataRepo();

      File f = new File(path);
      process(repo, f.getAbsolutePath(), f);

      // Test that all dependencies now exist in the component metadata map.
      Map<String, String> dependencies = new HashMap<>(128);
      for (ComponentMetadata md : repo.componentMetadataMap.values()) {
         if (md.getDependencies() != null) dependencies.putAll(md.getDependencies());
      }

      if (Boolean.getBoolean("infinispan.isCoreModule")) {
         // Perform this sanity check
         boolean hasErrors = false;
         for (Map.Entry<String, String> e : dependencies.entrySet()) {
            if (!repo.componentMetadataMap.containsKey(e.getKey())) {
               if (!repo.hasFactory(e.getKey())) {
                  System.out.printf(" [ComponentMetadataPersister]     **** WARNING!!!  Missing components or factories for dependency on %s%n", e.getKey());
                  hasErrors = true;
               }
            }
         }

         if (hasErrors && Boolean.getBoolean("infinispan.isCoreModule"))
            throw new RuntimeException("Could not pass sanity check of all annotated components and their respective factories/dependencies.");
      }
      writeMetadata(repo, outputFile);

      System.out.printf(" [ComponentMetadataPersister] %s components and %s factories.%n%n",
            repo.componentMetadataMap.size(), repo.factories.size());
   }
1168430
public static void main(String[] args) throws Exception {
		int argCount = 0;
		boolean sortClasses = false;
		for (; argCount < args.length; argCount++) {
			String arg = args[argCount];
			if (arg.equals("-s")) {
				sortClasses = true;
			} else {
				break;
			}
		}
		// we should have one arg left
		if (argCount != args.length - 1) {
			throw new IllegalArgumentException("Usage: OrmLiteConfigUtil [-s] config-file-name");
		}
		writeConfigFile(args[argCount], sortClasses);
	}
695501
public static void main(String[] args) throws Exception {
    Configuration conf = new Configuration();
    CompressionCodecFactory factory = new CompressionCodecFactory(conf);
    boolean encode = false;
    for(int i=0; i < args.length; ++i) {
      if ("-in".equals(args[i])) {
        encode = true;
      } else if ("-out".equals(args[i])) {
        encode = false;
      } else {
        CompressionCodec codec = factory.getCodec(new Path(args[i]));
        if (codec == null) {
          System.out.println("Codec for " + args[i] + " not found.");
        } else { 
          if (encode) {
            CompressionOutputStream out = 
              codec.createOutputStream(new java.io.FileOutputStream(args[i]));
            byte[] buffer = new byte[100];
            String inFilename = removeSuffix(args[i], 
                                             codec.getDefaultExtension());
            java.io.InputStream in = new java.io.FileInputStream(inFilename);
            int len = in.read(buffer);
            while (len > 0) {
              out.write(buffer, 0, len);
              len = in.read(buffer);
            }
            in.close();
            out.close();
          } else {
            CompressionInputStream in = 
              codec.createInputStream(new java.io.FileInputStream(args[i]));
            byte[] buffer = new byte[100];
            int len = in.read(buffer);
            while (len > 0) {
              System.out.write(buffer, 0, len);
              len = in.read(buffer);
            }
            in.close();
          }
        }
      }
    }
  }
41668
public static void main(String[] args) {
        if (args.length < 1) {
            System.out.println("Usage: PortableTypeGenerator <classDir>");
            System.exit(0);
        }

        try {
            instrumentClasses(new File(args[0]));
        }
        catch (Exception e) {
            System.out.println("ERROR:" + e.getMessage());
        }
    }
243019
public static void main(String[] args) throws Exception {
      Shell shell = new ShellImpl();
      shell.init(args);
      shell.run();
      System.exit(0);
   }
132263
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 inputHmlFile = new FileArgument("i", "input-hml-file", "input HML file, default stdin", false);
        FileArgument outputFile = new FileArgument("o", "output-file", "output allele assignment file, default stdout", false);

        ArgumentList arguments = new ArgumentList(about, help, inputHmlFile, outputFile);
        CommandLine commandLine = new CommandLine(args);

        ExtractExpectedHaploids extractExpectedHaploids = 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);
            }
            extractExpectedHaploids = new ExtractExpectedHaploids(inputHmlFile.getValue(), outputFile.getValue());
        }
        catch (CommandLineParseException | IllegalArgumentException e) {
            Usage.usage(USAGE, e, commandLine, arguments, System.err);
            System.exit(-1);
        }
        try {
            System.exit(extractExpectedHaploids.call());
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
619607
public static void main(String[] args) throws Exception {
    Options options = new Options();
    HelpFormatter hf = new HelpFormatter();
    hf.setWidth(100);
    options.addOption(
        Option.builder("i")
            .argName("in_path")
            .longOpt("input-file")
            .hasArg()
            .required()
            .desc("path to target jar/aar file")
            .build());
    options.addOption(
        Option.builder("p")
            .argName("pkg_name")
            .longOpt("package")
            .hasArg()
            .desc("qualified package name")
            .build());
    options.addOption(
        Option.builder("o")
            .argName("out_path")
            .longOpt("output-file")
            .hasArg()
            .required()
            .desc("path to processed jar/aar file")
            .build());
    options.addOption(
        Option.builder("h")
            .argName("help")
            .longOpt("help")
            .desc("print usage information")
            .build());
    options.addOption(
        Option.builder("d")
            .argName("debug")
            .longOpt("debug")
            .desc("print debug information")
            .build());
    options.addOption(
        Option.builder("v").argName("verbose").longOpt("verbose").desc("set verbosity").build());
    try {
      CommandLine line = new DefaultParser().parse(options, args);
      if (line.hasOption('h')) {
        hf.printHelp(appName, options, true);
        return;
      }
      String jarPath = line.getOptionValue('i');
      String pkgName = line.getOptionValue('p', "");
      String outPath = line.getOptionValue('o');
      boolean debug = line.hasOption('d');
      boolean verbose = line.hasOption('v');
      if (!pkgName.isEmpty()) {
        pkgName = "L" + pkgName.replaceAll("\\.", "/");
      }
      DefinitelyDerefedParamsDriver.run(jarPath, pkgName, outPath, debug, verbose);
      if (!new File(outPath).exists()) {
        System.out.println("Could not write jar file: " + outPath);
      }
    } catch (ParseException pe) {
      hf.printHelp(appName, options, true);
    }
  }
371599
public static void main(String[] args) throws Exception {
    ArgP argp = new ArgP();
    argp.addOption("--help", "Print help information.");
    CliOptions.addCommon(argp);
    FsckOptions.addDataOptions(argp);
    args = CliOptions.parse(argp, args);

    if (argp.has("--help")) {
      usage(argp, "", 0);
    }

    Config config = CliOptions.getConfig(argp);
    final FsckOptions options = new FsckOptions(argp, config);
    final TSDB tsdb = new TSDB(config);
    final ArrayList<Query> queries = new ArrayList<Query>();
    if (args != null && args.length > 0) {
      CliQuery.parseCommandLineQuery(args, tsdb, queries, null, null);
    }
    if (queries.isEmpty() && !argp.has("--full-scan")) {
      usage(argp, "Must supply a query or use the '--full-scan' flag", 1);
    }
    tsdb.checkNecessaryTablesExist().joinUninterruptibly();

    argp = null;
    final Fsck fsck = new Fsck(tsdb, options);
    try {
      if (!queries.isEmpty()) {
        fsck.runQueries(queries);
      } else {
        fsck.runFullTable();
      }
    } finally {
      tsdb.shutdown().joinUninterruptibly();
    }
    System.exit(fsck.totalErrors() == 0 ? 0 : 1);
  }
1277564
int run(String[] args) {
        try {
            handleOptions(args);

            // the following gives consistent behavior with javac
            if (classes == null || classes.size() == 0) {
                if (options.help || options.version || options.fullVersion)
                    return EXIT_OK;
                else
                    return EXIT_CMDERR;
            }

            try {
                return run();
            } finally {
                if (defaultFileManager != null) {
                    try {
                        defaultFileManager.close();
                        defaultFileManager = null;
                    } catch (IOException e) {
                        throw new InternalError(e);
                    }
                }
            }
        } catch (BadArgs e) {
            reportError(e.key, e.args);
            if (e.showUsage) {
                printLines(getMessage("main.usage.summary", progname));
            }
            return EXIT_CMDERR;
        } catch (InternalError e) {
            Object[] e_args;
            if (e.getCause() == null)
                e_args = e.args;
            else {
                e_args = new Object[e.args.length + 1];
                e_args[0] = e.getCause();
                System.arraycopy(e.args, 0, e_args, 1, e.args.length);
            }
            reportError("err.internal.error", e_args);
            return EXIT_ABNORMAL;
        } finally {
            log.flush();
        }
    }
1096631
public static void main(String[] args)
   {
      try
      {
         if (args.length != 1)
         {
            System.out.println("Usage: MpxCreate <output file name>");
         }
         else
         {
            create(args[0]);
         }
      }

      catch (Exception ex)
      {
         ex.printStackTrace(System.out);
      }
   }
356524
public static void main(String[] args) {
		if (args.length > 0) {
			System.out.printf("%s\n", getFullVersion());
		} else {
			System.out.println(VERSION);
		}
	}
24870
public static void main(String[] args) {
        /*
         * Developers Notes:
         *
         * -No corresponding Junit test class currently
         * provided.  Test by eyeball of the output.
         *
         * -Add a menu with Help(About)
         * --> TBD.
         *
         * -Figure out some sane way to set initial default
         * column sizes.
         *
         * -Lots of inner classes here, done in order to keep
         * all the .class files easily identifiable.  Some of
         * this code is pretty ugly, very procedural in nature.
         * Lots of very tight coupling between all the classes,
         * thinly disguised switch statements, etc ..... This
         * code written on the fly, with almost no thought given
         * to OO design.
         *
         * -Also, I'm not really a GUI guy, so forgive any
         * transgressions.
         *
         */
            if ( args.length < 1 ) {
                System.err.println("File name is required!");
                usage();
                System.exit(1);
            }
        /*
         * Instantiate a DateTimeBrowser and invoke it's go method,
         * passing the input argument list.
         */
        new DateTimeBrowser().go( args );
    }
1047290
private void run(String[] arguments) throws Exception {

        if(isHelpRequested(arguments)) {
            usage();
        }

        validateArguments(arguments);

        checkTemporaryDirectory(arguments);


        addShutdownHook();

        File war = getWarLocation();

        File tempDirectory = createTempDirectory(war.getName(), getPort(arguments));

        cl = createClassLoader(war, tempDirectory);

        Thread.currentThread().setContextClassLoader(cl);

        startJettyConsole(cl, arguments, tempDirectory);
    }
207440
public static void main(String[] args) {
		if (args.length != 2) {
			DEFAULT_OUT.printf("The received argument is not valid : %1$s%n",
					Arrays.toString(args));
			System.exit(-1);// NOSONAR
		}
		PowerUnit mbean = new PowerUnit();
		MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
		ObjectName name;
		try {
			name = new ObjectName("ch.powerunit.jmx:type=PowerUnit");
			mbs.registerMBean(mbean, name);
		} catch (MalformedObjectNameException | InstanceAlreadyExistsException
				| MBeanRegistrationException | NotCompliantMBeanException e1) {
			e1.printStackTrace();
		}
		String outputPath = args[0];
		String classes[] = args[1].split("\\s*,\\s*");
		StringBuilder resumedSucess = new StringBuilder();
		StringBuilder resumedFailure = new StringBuilder();
		StringBuilder resumedSkipped = new StringBuilder();

		boolean success = true;
		for (String c : classes) {
			DEFAULT_OUT.printf("Running test for %1$s%n", c);
			try {
				PowerUnitRunner r = null;
				if (c.contains(":")) {
					String param[] = c.split("\\s*:\\s*");
					Class<?> cls = Class.forName(param[0]);
					Method m = cls.getMethod(param[1]);
					r = new DefaultPowerUnitRunnerImpl(cls, m);
				} else {
					Class<?> cls = Class.forName(c);
					r = new DefaultPowerUnitRunnerImpl(cls);
				}
				DefaultTestResultListener def = new DefaultTestResultListener(
						outputPath, DEFAULT_OUT, mbean);
				r.addListener(def);
				r.run();// NOSONAR
				success &= !def.isError();
				resumedSucess.append(def.getResumedSucess());
				resumedFailure.append(def.getResumedFailure());
				resumedSkipped.append(def.getResumedSkipped());
			} catch (ClassNotFoundException e) {
				DEFAULT_OUT.printf("Unable to create the class %1$s%n", c);
			} catch (NoSuchMethodException e) {
				DEFAULT_OUT.printf(
						"Unable to create the find the method %1$s%n", c);
			} catch (SecurityException e) {
				DEFAULT_OUT
						.printf("Unable to create the test because of security issue %1$s%n",
								c);
			} finally {
				DEFAULT_OUT.printf("End running test for %1$s%n", c);
			}
		}
		DEFAULT_OUT.print("\n\nSuccess tests:\n" + resumedSucess.toString()
				+ "\n\nSkipped tests:\n" + resumedSkipped.toString()
				+ "\n\nFailed tests:\n" + resumedFailure.toString() + "\n");
		if (!success) {
			System.exit(-1);// NOSONAR
		}
		System.exit(0);// NOSONAR
	}
10509
public static void main(String [] args){
		displayCopyright();        
        if (!checkArgs(args)) {
            displayHelp();
            return;
        }
        
      //get model dir
        String modelDir = args[1];
        CRFSegmenter segmenter = new CRFSegmenter(modelDir);
        
      //tagging
        try {
        	System.out.println(args[2]);
	        if (args[2].equalsIgnoreCase("-inputfile")){
	        	System.out.println(args[3]);
	        	File inputFile = new File(args[3]);
	        	BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(
	        			new FileOutputStream(inputFile.getPath() + ".wseg"), "UTF-8"));
	        	
	        	String result = segmenter.segmenting(inputFile);
	        	
	        	writer.write(result);
	        	writer.close();
	        }
	        else{ //input dir
	        	String inputDir = args[3];
	        	 if (inputDir.endsWith(File.separator)) {
		                inputDir = inputDir.substring(0, inputDir.length() - 1);
		            }
		            
		            File dir = new File(inputDir);
		            String[] children = dir.list(new FilenameFilter() {
		                public boolean accept(File dir, String name) {
		                    return name.endsWith(".tkn");
		                }
		            });    
		            
		            for (int i = 0; i < children.length; i++) {
		            	System.out.println("Segmenting " + children[i]);
		            	String filename = inputDir + File.separator + children[i];
			                if ((new File(filename)).isDirectory()) {
			                    continue;
			            }
			                
			            BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(
				        			new FileOutputStream(filename + ".wseg"), "UTF-8"));
			             
			            writer.write(segmenter.segmenting(new File(filename)));
			             
			            writer.close();
		            }
	        }
        }
        catch (Exception e){
        	System.out.println("Error while segmenting");
        	System.out.println(e.getMessage());
        	e.printStackTrace();
        }
	}
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);
    }