Generate Allure report data from directories with allure report results.

@param args a list of directory paths. First (args.length - 1) arguments -
results directories, last argument - the folder to generated data
196202
public static void main(String[] args) {
        if (args.length < 2) { // NOSONAR
            LOGGER.error("There must be at least two arguments");
            return;
        }
        int lastIndex = args.length - 1;
        AllureReportGenerator reportGenerator = new AllureReportGenerator(
                getFiles(Arrays.copyOf(args, lastIndex))
        );
        reportGenerator.generate(new File(args[lastIndex]));
    }
356174
public static void main(final String... args) {
        if (args.length != 2) {
            System.err.println("Usage: XMLShredder input.xml output.tnk");
            System.exit(1);
        }

        System.out.print("Shredding '" + args[0] + "' to '" + args[1] + "' ... ");
        final long time = System.currentTimeMillis();
        final File target = new File(args[1]);

        Injector injector =
            Guice.createInjector(new ModuleSetter().setDataFacClass(TreeNodeFactory.class).setMetaFacClass(
                NodeMetaPageFactory.class).createModule());
        IBackendFactory storage = injector.getInstance(IBackendFactory.class);
        IRevisioning revision = injector.getInstance(IRevisioning.class);

        try {
            final StorageConfiguration config = new StorageConfiguration(target);
            Storage.createStorage(config);
            final IStorage db = Storage.openStorage(target);
            Properties props = new Properties();
            props
                .setProperty(org.treetank.access.conf.ConstructorProps.STORAGEPATH, target.getAbsolutePath());
            props.setProperty(org.treetank.access.conf.ConstructorProps.RESOURCE, "shredded");
            db.createResource(new ResourceConfiguration(props, storage, revision, new TreeNodeFactory(),
                new NodeMetaPageFactory()));
            final ISession session =
                db.getSession(new SessionConfiguration("shredded", StandardSettings.KEY));
            final INodeWriteTrx wtx = new NodeWriteTrx(session, session.beginBucketWtx(), HashKind.Rolling);
            final XMLEventReader reader = createFileReader(new File(args[0]));
            final XMLUpdateShredder shredder =
                new XMLUpdateShredder(wtx, reader, EShredderInsert.ADDASFIRSTCHILD, new File(args[0]),
                    EShredderCommit.COMMIT);
            shredder.call();

            wtx.close();
            session.close();
        } catch (final TTException exc) {
            exc.printStackTrace();
        } catch (final IOException exc) {
            exc.printStackTrace();
        } catch (final XMLStreamException exc) {
            exc.printStackTrace();
        }

        System.out.println(" done [" + (System.currentTimeMillis() - time) + "ms].");
    }
618136
public static List<File> listAttachmentFiles(File... directories) {
        return listFilesByRegex(
                AllureConfig.newInstance().getAttachmentFileRegex(),
                directories
        );
    }
833967
public static void main(String[] args)
   {
      String outputDir = "out"; //default output directory
      String defxml = null;
      int arg = 0;

      if (args.length > 0)
      {
         while (args.length > arg + 1)
         {
            if (args[arg].startsWith("-"))
            {
               if (args[arg].equals("-o"))
               {
                  arg++;
                  if (arg >= args.length)
                  {
                     usage();
                     System.exit(OTHER);
                  }
                  outputDir = args[arg];
               }
               else if (args[arg].equals("-f"))
               {
                  arg++;
                  if (arg >= args.length)
                  {
                     usage();
                     System.exit(OTHER);
                  }
                  defxml = args[arg];
               }
            }
            else
            {
               usage();
               System.exit(OTHER);
            }
            arg++;
         }
      }
      try
      {
         File out = new File(outputDir);
         Utils.recursiveDelete(out);

         Definition def;

         if (defxml == null)
            def = inputFromCommandLine();
         else
            def = inputFromXml(defxml);

         if (def == null)
            System.exit(ERROR);

         def.setOutputDir(outputDir);

         Profile profile;
         switch (def.getVersion())
         {
            case "1.7":
               profile = new JCA17Profile();
               break;
            case "1.6":
               profile = new JCA16Profile();
               break;
            case "1.5":
               profile = new JCA15Profile();
               break;
            default:
               profile = new JCA10Profile();
               break;
         }
         profile.generate(def);

         if (def.getBuild().equals("ant"))
            copyAllJars(outputDir);

         System.out.println(rb.getString("code.wrote"));
         System.exit(SUCCESS);
      }
      catch (IOException | JAXBException e)
      {
         e.printStackTrace();
      }
   }
841157
public void addAll(final String... args) {
        if (args != null) {
            for (String arg : args) {
                add(arg);
            }
        }
    }
222590
public static void main(String[] args) throws IOException, JAXBException {
        if (args.length != 1)
            throw new IOException("A project directory path must be specified.");

        File projectDir = new File(args[0]);
        File outputDir;

        boolean failOnExit = true;

        if (projectDir.getName().equals("ant_build")) {
            // we are wanting to validate ALL projects, so we need to go up one level.
            System.out.println("Validating all projects...");
            projectDir = projectDir.getParentFile();
            outputDir = new File(projectDir.getAbsolutePath() + "/build.image/output/metatypeValidator/");
            projectDir = new File(projectDir, "build.image");
            projectDir = new File(projectDir, "wlp");
            projectDir = new File(projectDir, "lib");

            failOnExit = false;
        } else {
            outputDir = new File(projectDir.getAbsolutePath() + "/build/reports/metatypeValidator/");
            projectDir = new File(projectDir, "build");
            projectDir = new File(projectDir, "lib");
        }
        if (!outputDir.exists() && !outputDir.mkdirs())
            throw new IOException("Failed to create output directory: " + outputDir.getAbsolutePath());

        List<Project> projects = new MetatypeValidator(projectDir, outputDir).validate(!failOnExit);
        int rCode = -1;

        if (projects.isEmpty()) {
            System.out.println("uhh...something bad happened and no projects were returned...");
        } else {
            for (Project project : projects) {
                List<ValidationEntry> validationEntries = project.validationEntries;

                for (ValidationEntry validationEntry : validationEntries) {
                    if (validationEntry.validity == ValidityState.Pass) {
                        if (rCode == -1)
                            rCode = 0;
                    } else if (validationEntry.validity == ValidityState.Warning) {
                        if (rCode < 1)
                            rCode = 1;
                    } else if (validationEntry.validity == ValidityState.Failure) {
                        rCode = 2;
                    } else {
                        if (validationEntry.validity == ValidityState.MetatypeNotFound)
                            rCode = 3;
                        else if (validationEntry.validity == ValidityState.NotValidated)
                            rCode = 4;

                    }
                }
            }

            if (failOnExit) {
                if (rCode == 0)
                    System.out.println("Metatype validation passed.");
                else if (rCode == 1)
                    System.out.println("Metatype validation passed with warnings.");
                else if (rCode == 2) {
                    System.out.println("Metatype validation FAILED!");
                    System.exit(2);
                } else if (rCode == 3 || rCode == -1)
                    System.out.println("No metatype file(s) found.");
                else if (rCode == 4)
                    System.out.println("Could not validate metatype file(s).");
                else
                    System.out.println("return code " + rCode);
            }
        }
    }
663394
public static void main(String[] args) {
        // Multithreaded map rendering
        Parameters.NUMBER_OF_THREADS = 2;

        // Square frame buffer
        Parameters.SQUARE_FRAME_BUFFER = false;

        HillsRenderConfig hillsCfg = null;
        File demFolder = getDemFolder(args);
        if (demFolder != null) {
            MemoryCachingHgtReaderTileSource tileSource = new MemoryCachingHgtReaderTileSource(demFolder, new DiffuseLightShadingAlgorithm(), AwtGraphicFactory.INSTANCE);
            tileSource.setEnableInterpolationOverlap(true);
            hillsCfg = new HillsRenderConfig(tileSource);
            hillsCfg.indexOnThread();
            args = Arrays.copyOfRange(args, 1, args.length);
        }

        List<File> mapFiles = SHOW_RASTER_MAP ? null : getMapFiles(args);
        final MapView mapView = createMapView();
        final BoundingBox boundingBox = addLayers(mapView, mapFiles, hillsCfg);

        final PreferencesFacade preferencesFacade = new JavaPreferences(Preferences.userNodeForPackage(Samples.class));

        final JFrame frame = new JFrame();
        frame.setTitle("Mapsforge Samples");
        frame.add(mapView);
        frame.pack();
        frame.setSize(1024, 768);
        frame.setLocationRelativeTo(null);
        frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
        frame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                int result = JOptionPane.showConfirmDialog(frame, MESSAGE, TITLE, JOptionPane.YES_NO_OPTION);
                if (result == JOptionPane.YES_OPTION) {
                    mapView.getModel().save(preferencesFacade);
                    mapView.destroyAll();
                    AwtGraphicFactory.clearResourceMemoryCache();
                    frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
                }
            }

            @Override
            public void windowOpened(WindowEvent e) {
                final Model model = mapView.getModel();
                model.init(preferencesFacade);
                if (model.mapViewPosition.getZoomLevel() == 0 || !boundingBox.contains(model.mapViewPosition.getCenter())) {
                    byte zoomLevel = LatLongUtils.zoomForBounds(model.mapViewDimension.getDimension(), boundingBox, model.displayModel.getTileSize());
                    model.mapViewPosition.setMapPosition(new MapPosition(boundingBox.getCenterPoint(), zoomLevel));
                }
            }
        });
        frame.setVisible(true);
    }
1103833
public static void main(String[] args) {

		showTitle("JRE Properties"); //$NON-NLS-1$

		showPropertyValue("java.class.path"); //$NON-NLS-1$
		showPropertyValue("java.library.path"); //$NON-NLS-1$
		showPropertyValue("java.home"); //$NON-NLS-1$
		showPropertyValue("os.name"); //$NON-NLS-1$
		showPropertyValue("os.version"); //$NON-NLS-1$
		showPropertyValue("file.separator"); //$NON-NLS-1$
		showPropertyValue("path.separator"); //$NON-NLS-1$
		showPropertyValue("sun.arch.data.model"); //$NON-NLS-1$
		showPropertyValue("user.dir"); //$NON-NLS-1$
		showPropertyValue("user.name"); //$NON-NLS-1$
		showPropertyValue("user.home"); //$NON-NLS-1$

		showTitle("FileSystem"); //$NON-NLS-1$

		showValue("getUserHomeDirectoryName()", FileSystem.getUserHomeDirectoryName()); //$NON-NLS-1$
		try {
			showValue("getUserHomeDirectory()", FileSystem.getUserHomeDirectory()); //$NON-NLS-1$
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}

		showTitle("OperatingSystem"); //$NON-NLS-1$

		showValue("getCurrentOSName()", OperatingSystem.getCurrentOSName()); //$NON-NLS-1$
		showValue("getCurrentOSVersion()", OperatingSystem.getCurrentOSVersion()); //$NON-NLS-1$
		showValue("getOSSerialNumber()", OperatingSystem.getOSSerialNumber()); //$NON-NLS-1$
		showValue("getOSUUID()", OperatingSystem.getOSUUID()); //$NON-NLS-1$
		showValue("getIdentificationType()", OperatingSystem.getIdentificationType().name()); //$NON-NLS-1$
		showValue("getOperatingSystemArchitectureDataModel()", //$NON-NLS-1$
				Integer.toString(OperatingSystem.getOperatingSystemArchitectureDataModel()));
		showValue("getCurrentOS()", OperatingSystem.getCurrentOS().name()); //$NON-NLS-1$
		showValue("is32BitOperatingSystem()", Boolean.toString(OperatingSystem.is32BitOperatingSystem())); //$NON-NLS-1$
		showValue("is64BitOperatingSystem()", Boolean.toString(OperatingSystem.is64BitOperatingSystem())); //$NON-NLS-1$
	}
186334
public static void main(String[] args) throws IOException {
    if (args.length == 0 || args[0].equals("--help")) {
      help();
      return;
    }
    if (args[0].equals("--list")) {
      listFilesystems();
      return;
    }
    if (args[0].equals("--check")) {
      checkGcs();
      return;
    }
    for (String a : args) {
      statFile(a);
    }
  }
749518
public static void main(String[] args) throws IOException {
    Collection<? extends PropertyKey> defaultKeys = PropertyKey.defaultKeys();
    defaultKeys.removeIf(key -> key.isHidden());
    String homeDir = new InstancedConfiguration(ConfigurationUtils.defaults())
        .get(PropertyKey.HOME);
    // generate CSV files
    String filePath = PathUtils.concatPath(homeDir, CSV_FILE_DIR);
    writeCSVFile(defaultKeys, filePath);
    // generate YML files
    filePath = PathUtils.concatPath(homeDir, YML_FILE_DIR);
    writeYMLFile(defaultKeys, filePath);
  }
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();
        }
    }
1351308
public static void main(String[] args) throws Exception
	{
		final String name = args[0];
		final File sslCert = new File(args[1]);
		final File sslKey = new File(args[2]);
		final Map<File, Integer> foldersAndPorts = getFoldersAndPorts(3, args);

		NginxSiteGenerator generator = new NginxSiteGenerator();

		final String config = generator.render(name, sslCert, sslKey, foldersAndPorts);

		System.out.println(config);
	}
752030
public static void main(String [] args){
		  //tagging
		if (args.length != 2){
			System.out.println("WordTrainGenerating [Model Dir] [File/Folder]");
			System.out.println("Generating training data for word segmentation with FlexCRFs++ or jvnmaxent (in JVnTextPro)");
			System.out.println("Model Dir: directory containing featuretemple file");
			System.out.println("Input File/Folder: file/folder name containing data manually tagged for training");
			return;
		}
		
		WordTrainGenerating trainGen = new WordTrainGenerating(args[0]);
		trainGen.generateTrainData(args[1], args[1]);		
	}
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();
        }
	}
341488
public void run(String[] args) {
        argOptions = setupOptions();
        try {
            if (args.length < 3) {
                usage();
                System.exit(1);
            }
            argOptions.parseOptions(args);
            
            if (argOptions.numPositionalArgs() < 4) {
                throw new IllegalArgumentException(
                        "must include all Required args");
            }

            Properties props = setupProperties();

            String corpusDir = argOptions.getPositionalArg(0);
            String analogyFile = argOptions.getPositionalArg(1);
            String testAnalogies = argOptions.getPositionalArg(2);
            String outputFile = argOptions.getPositionalArg(3);
            String indexDir = corpusDir;
            String userSpecifiedDir = 
                props.getProperty(LatentRelationalAnalysis.LRA_INDEX_DIR);
            if (userSpecifiedDir != null) {
                indexDir = userSpecifiedDir;
            } 

            boolean doIndex = true; //set as option later
            String skipIndexProp = props.getProperty(
                    LatentRelationalAnalysis.LRA_SKIP_INDEX);
            if (skipIndexProp.equals("true")) {
                doIndex = false; //set as option later
            }
            LatentRelationalAnalysis lra = new LatentRelationalAnalysis(
                    corpusDir, indexDir, doIndex,
                    SVD.getFastestAvailableFactorization());

            //Steps 1-2. Load analogy input
            lra.loadAnalogiesFromFile(analogyFile);

            Matrix projection;

            // if we load a projection matrix from file, we can skip all the
            // preprocessing
            String readProjectionFile = props.getProperty(
                    LatentRelationalAnalysis.LRA_READ_MATRIX_FILE);
            if (readProjectionFile != null) {
                File readFile = new File(readProjectionFile);
                if (readFile.exists()) {
                    projection = 
                        MatrixIO.readMatrix(new File(readProjectionFile), 
                                            MatrixIO.Format.SVDLIBC_SPARSE_TEXT,
                                            Matrix.Type.SPARSE_IN_MEMORY);
                } else {
                    throw new IllegalArgumentException(
                        "specified projection file does not exist");
                }
            } else { //do normal LRA preprocessing...


                //Step 3. Get patterns Step 4. Filter top NUM_PATTERNS
                lra.findPatterns();

                //Step 5. Map phrases to rows 
                lra.mapRows();
                //Step 6. Map patterns to columns 
                lra.mapColumns();

                //Step 7. Create sparse matrix 
                Matrix sparse_matrix = lra.createSparseMatrix();

                //Step 8. Calculate entropy
                sparse_matrix = lra.applyEntropyTransformations(sparse_matrix);

                //Step 9. Compute SVD on the pre-processed matrix.
                int dimensions = 300; //TODO: set as option
                String userSpecfiedDims = props.getProperty(
                        LatentRelationalAnalysis.LRA_DIMENSIONS_PROPERTY);
                if (userSpecfiedDims != null) {
                    try {
                        dimensions = Integer.parseInt(userSpecfiedDims);
                    } catch (NumberFormatException nfe) {
                        throw new IllegalArgumentException(
                            LatentRelationalAnalysis.LRA_DIMENSIONS_PROPERTY +
                            " is not an integer: " + userSpecfiedDims);
                    }
                }
                projection = lra.computeSVD(sparse_matrix, dimensions);

                //Step 10. Compute projection matrix from U and S.  This is
                //already returned by the matrix factorization.
            }

            String writeProjectionFile = props.getProperty(
                    LatentRelationalAnalysis.LRA_WRITE_MATRIX_FILE);
            if(writeProjectionFile != null) {
                MatrixIO.writeMatrix(projection, 
                                     new File(writeProjectionFile),
                                     MatrixIO.Format.SVDLIBC_SPARSE_TEXT);
            }

            //Step 11. Get analogy input and Evaluate Alternatives
            lra.evaluateAnalogies(projection, testAnalogies, outputFile);
        } catch (Throwable t)  {
            t.printStackTrace();
        }
    }
444439
public static void main(String[] args) {
        File dir = null;

        System.out.println("checkLocalRserve: " + checkLocalRserve());
        try {
            RConnection c = new RConnection();
            //c.eval("cat('123')");
            dir = new File(c.eval("getwd()").asString());
            System.err.println("wd: " + dir);
            //c.eval("flush.console <-function(...) return;"); // will crash without that...
            c.eval("download.file('https://www.r-project.org/',paste0(getwd(),'/log.txt'))");
            c.shutdown();
        } catch (Exception x) {
            x.printStackTrace();
        }

        if (new File(dir, "log.txt").exists()) {
            System.err.println("OK: file exists");
            if (new File(dir, "log.txt").length() > 10) {
                System.err.println("OK: file not empty");
            } else {
                System.err.println("NO: file EMPTY");
            }
        } else {
            System.err.println("NO: file DOES NOT exist");
        }
    }
1231187
public static void main(String[] args) {
        File from;
        File to;
        
        if (args.length < 2) {
            System.out.println("Usage:  DataMigrator <pathToSourceFile> <pathToDestFile>"); //$NON-NLS-1$
            return;
        }
        
        String frompath = args[0];
        String topath = args[1];
        
        from = new File(frompath);
        to = new File(topath);

        System.out.println("Starting data migration."); //$NON-NLS-1$
        System.out.println("  From: " + from); //$NON-NLS-1$
        System.out.println("  To:   " + to); //$NON-NLS-1$
        DataMigrator migrator = new DataMigrator();
        migrator.setLogger(new SystemOutLogger());
        Version version = new Version();
        version.postConstruct();
        migrator.setVersion(version);
        migrator.migrate(from, to);
    }