code: private int init(String[] args) {
      try {
        for (int i = 0; i < args.length; i++) { // parse command line
          if (args[i].equals("-maxDepth")) {
            maxDepth = Integer.parseInt(args[++i]);
            if (maxDepth<1) {
              System.err.println("maxDepth must be positive: " + maxDepth);
              return -1;
            }
          } else if (args[i].equals("-minWidth")) {
            minWidth = Integer.parseInt(args[++i]);
            if (minWidth<0) {
              System.err.println("minWidth must be positive: " + minWidth);
              return -1;
            }
          } else if (args[i].equals("-maxWidth")) {
            maxWidth = Integer.parseInt(args[++i]);
          } else if (args[i].equals("-numOfFiles")) {
            numOfFiles = Integer.parseInt(args[++i]);
            if (numOfFiles<1) {
              System.err.println("NumOfFiles must be positive: " + numOfFiles);
              return -1;
            }
          } else if (args[i].equals("-avgFileSize")) {
            avgFileSize = Double.parseDouble(args[++i]);
            if (avgFileSize<=0) {
              System.err.println("AvgFileSize must be positive: " + avgFileSize);
              return -1;
            }
          } else if (args[i].equals("-outDir")) {
            outDir = new File(args[++i]);
          } else if (args[i].equals("-seed")) {
            r = new Random(Long.parseLong(args[++i]));
          } else {
            System.err.println(USAGE);
            ToolRunner.printGenericCommandUsage(System.err);
            return -1;
          }
        }
      } catch (NumberFormatException e) {
        System.err.println("Illegal parameter: " + e.getLocalizedMessage());
        System.err.println(USAGE);
        return -1;
      }
  
      if (maxWidth < minWidth) {
        System.err.println(
            "maxWidth must be bigger than minWidth: " + maxWidth);
        return -1;
      }
  
      if (r==null) {
        r = new Random();
      }
      return 0;
    }
docs: Parse the command line arguments and initialize the data