Perform the code generation tasks for the specified option-set.
@param taskOptions           - Task options for the plugin.
428436
function generateCode(taskOptions) {
  try {
    // Perform initialization tasks
    const model = taskOptions.swagger;
    debug('Processing configuration');
    const config = defaults(taskOptions, configDefaults);
    debug('  Initializing template engine');
    const templateEngine = taskOptions.templateEngine(taskOptions);
    debug('  Mapping definitions from file');
    const definitionMap = taskOptions.definitionMapper(model);

    // Execute definition templates
    /* istanbul ignore else - Trivial case */
    if (config.perDefinition) {
      debug('  Executing per-definition templates:');
      for (const templateFile of Object.keys(config.perDefinition)) {
        debug('    Iterating template: %s', templateFile);
        const options = defaults(config.perDefinition[templateFile], {
          extension: '.js',
          operations: ['get', 'put', 'post', 'delete'],
        });
        const template = taskOptions.templateLoader(templateEngine)
          .loadTemplate(templateFile, taskOptions.textEncoding);
        for (const definitionKey of Object.keys(definitionMap)) {
          const definition = definitionMap[definitionKey];

          debug('      Processing definition %s', definitionKey);
          // Copy fields from options into definition for
          const context = {
            model,
            definition,
            definitionMap,
            options,
          };

          debug('      Rendering template');
          const output = template(context);
          const subPath = path.join(options.target,
            definition.definitionName.toLowerCase() +
            options.extension);
          taskOptions.output(subPath, output);
        }
      }
    } else {
      debug('    No per-definition templates specified in perDefinition');
    }

    // Execute path templates
    if (config.perPath) {
      debug('  Executing per-path templates:');
      for (const templateFile of Object.keys(config.perPath)) {
        debug('    Processing template: %s', templateFile);
        const options = defaults(config.perPath[templateFile], {
          extension: '.js',
          operations: ['get', 'put', 'post', 'delete'],
        });
        const template = taskOptions.templateLoader(templateEngine)
          .loadTemplate(templateFile, taskOptions.textEncoding);
        debug('    Iterating paths, grouping operations by %s', options.groupBy);

        const groups = {};

        for (const pathString of Object.keys(model.paths)) {
          debug('      Path: %s', pathString);
          const pathDef = model.paths[pathString];
          let groupKey = pathDef[options.groupBy];
          pathDef.pathString = pathString;

          // Iterate through the allowed operations
          for (const operationString of _.intersection(Object.keys(pathDef), options.operations)) {
            debug('        Operation: %s', operationString);
            const operationDef = model.paths[pathString][operationString];
            groupKey = operationDef[options.groupBy] || groupKey;
            operationDef.pathDef = pathDef;
            operationDef.operationString = operationString;

            // We need a grouping key at either operation or path level
            /* istanbul ignore if */
            if (groupKey === null || groupKey === undefined) {
              throw new Error(util.format(
                'Cannot map path operation. No groupBy match at path/operation level: %s/%s [%s]',
                pathString,
                operationString,
                options.groupBy));
            }
            debug('          Assigned to output group: %s', groupKey);

            // If the group does not exist, create it
            if (groups[groupKey] === undefined) {
              groups[groupKey] = [];
            }

            // Add to group
            groups[groupKey].push(operationDef);
          } // per operationString
        } // per pathString

        debug('    Rendering template for %s group(s)', Object.keys(groups).length);
        for (const groupKey of Object.keys(groups)) {
          debug('      Processing group: %s', groupKey);

          const context = {};
          context.fileName = groupKey.trim().toLowerCase();
          context.groupKey = groupKey;
          context.members = groups[groupKey];
          context.definitionMap = definitionMap;
          context.model = model;
          context.options = options;

          const output = template(context);
          const subPath = path.join(options.target,
            context.fileName + options.extension);
          taskOptions.output(subPath, output);
        }
      } // per templateFile
    } // if perPath
  } catch (err) {
    /* istanbul ignore next - We don't wan't to test process.exit */
    taskOptions.failureHandler(err);
  }
}
93172
public void setPerformanceOptions(PerformanceOptionsEnum... thePerformanceOptions) {
		Collection<PerformanceOptionsEnum> asList = null;
		if (thePerformanceOptions != null) {
			asList = Arrays.asList(thePerformanceOptions);
		}
		setPerformanceOptions(asList);
	}
1227067
public void modifyOptions(Map<String, Object> options) throws ProvisioningApiException {
        try {

            OptionsPostResponseStatusSuccess resp = optionsApi.optionsPost(new OptionsPost().data(new OptionsPostData().options(options)));

            if (!resp.getStatus().getCode().equals(0)) {
                throw new ProvisioningApiException("Error modifying options. Code: " + resp.getStatus().getCode());
            }

        } catch (ApiException e) {
            throw new ProvisioningApiException("Error modifying options", e);
        }
    }
33691
private void setOption(String opt, List<String> arguments) {
        String[] args = new String[arguments.length() + 1];
        int k = 0;
        args[k++] = opt;
        for (List<String> i = arguments; i.nonEmpty(); i=i.tail) {
            args[k++] = i.head;
        }
        options.append(args);
    }
1138067
@SuppressWarnings("static-access")
	private static void initOptions() {

		List<String> actions = new ArrayList<>(KNOWN_ACTIONS.keySet());
		Collections.sort(actions);
		Option action = OptionBuilder
				.hasArg()
				.withArgName("action")
				.withDescription(
						"define the action that should be performed; avaible actions: "
								+ actions).withLongOpt(OPTION_ACTION)
				.create(CMD_OPTION_ACTION);

		Option destination = OptionBuilder.withArgName("path").hasArg()
				.withDescription("place the output into the file at <path>")
				.withLongOpt(OPTION_OUTPUT_DESTINATION)
				.create(CMD_OPTION_OUTPUT_DESTINATION);

		Option dumplocation = OptionBuilder
				.hasArg()
				.withArgName("path")
				.withDescription(
						"set the directory where downloaded dump files are stored")
				.withLongOpt(OPTION_DUMP_LOCATION)
				.create(CMD_OPTION_DUMP_LOCATION);

		Option config = OptionBuilder
				.hasArg()
				.withArgName("file")
				.withDescription(
						"set a config file; use this to define multiple actions for a single run")
				.withLongOpt(OPTION_CONFIG_FILE).create(CMD_OPTION_CONFIG_FILE);

		Option rdfdump = OptionBuilder
				.hasArgs()
				.withArgName("task")
				.withDescription(
						"specify which data to include in RDF dump (use with action \"rdf\"); run with options \"-a rdf -n\" for help")
				.withLongOpt(OPTION_OUTPUT_RDF_TYPE).create();

		Option filterLanguages = OptionBuilder
				.hasArgs()
				.withArgName("languages")
				.withDescription(
						"specifies a list of language codes; if given, only terms in languages in this list will be processed; the value \"-\" denotes the empty list (no terms are processed)")
				.withLongOpt(OPTION_FILTER_LANGUAGES).create();

		Option filterSites = OptionBuilder
				.hasArgs()
				.withArgName("sites")
				.withDescription(
						"specifies a list of site keys; if given, only site links to sites in this list will be processed; the value \"-\" denotes the empty list (no site links are processed)")
				.withLongOpt(OPTION_FILTER_SITES).create();

		Option filterProperties = OptionBuilder
				.hasArgs()
				.withArgName("ids")
				.withDescription(
						"specifies a list of property ids; if given, only statements for properties in this list will be processed; the value \"-\" denotes the empty list (no statements are processed)")
				.withLongOpt(OPTION_FILTER_PROPERTIES).create();

		Option compressionExtention = OptionBuilder
				.hasArg()
				.withArgName("type")
				.withDescription(
						"define a compression format to be used for the output; possible values: "
								+ DumpProcessingOutputAction.COMPRESS_GZIP
								+ ", "
								+ DumpProcessingOutputAction.COMPRESS_BZ2)
				.withLongOpt(OPTION_OUTPUT_COMPRESSION)
				.create(CMD_OPTION_OUTPUT_COMPRESSION);

		Option report = OptionBuilder
				.hasArg()
				.withArgName("path")
				.withDescription(
						"specifies a path to print a final report after dump generations")
				.withLongOpt(OPTION_CREATE_REPORT)
				.create(CMD_OPTION_CREATE_REPORT);

		Option localDump = OptionBuilder
				.hasArg()
				.withArgName("path")
				.withDescription(
						"select a dump file for processing; if omitted, then the latest dump from Wikidata will be used (and possibly downloaded)")
				.withLongOpt(OPTION_LOCAL_DUMPFILE)
				.create(CMD_OPTION_LOCAL_DUMPFILE);

		options.addOption(config);
		options.addOption(action);
		options.addOption(
				CMD_OPTION_QUIET,
				OPTION_QUIET,
				false,
				"perform all actions quietly, without printing status messages to the console; errors/warnings are still printed to stderr");
		options.addOption(destination);
		options.addOption(dumplocation);
		options.addOption(filterLanguages);
		options.addOption(filterSites);
		options.addOption(filterProperties);
		options.addOption(compressionExtention);
		options.addOption(report);
		options.addOption(localDump);
		options.addOption(rdfdump);
		options.addOption(CMD_OPTION_OFFLINE_MODE, OPTION_OFFLINE_MODE, false,
				"execute all operations in offline mode, especially do not download new dumps");
		options.addOption(CMD_OPTION_HELP, OPTION_HELP, false,
				"print this message");

		options.addOption(CMD_OPTION_OUTPUT_STDOUT, OPTION_OUTPUT_STDOUT,
				false, "write output to stdout");
	}
939133
public static void setInputChoiceStrategy(Job job, Class<? extends FromCobolChoiceStrategy> choiceStrategyClass) {
      job.getConfiguration().setClass(CONF_INPUT_RECORD_CHOICE_STRATEGY_CLASS, choiceStrategyClass, FromCobolChoiceStrategy.class);
    }
1130954
def run_step(self):
        

        # Resolve ^^task_name.return_value style option syntax
        task_config = self.step.task_config.copy()
        task_config["options"] = task_config["options"].copy()
        self.flow.resolve_return_value_options(task_config["options"])

        exc = None
        try:
            task = self.step.task_class(
                self.project_config,
                TaskConfig(task_config),
                org_config=self.org_config,
                name=self.step.task_name,
                stepnum=self.step.step_num,
                flow=self.flow,
            )
            self._log_options(task)
            task()
        except Exception as e:
            self.flow.logger.exception(
                "Exception in task {}".format(self.step.task_name)
            )
            exc = e
        return StepResult(
            self.step.step_num,
            self.step.task_name,
            self.step.path,
            task.result,
            task.return_values,
            exc,
        )
412360
@Override
    public void execute() {
        for (Task t : tasks) {
            if (t instanceof UnknownElement) {
                t.maybeConfigure();
                Object proxy = ((UnknownElement) t).getWrapper().getProxy();
                if (proxy instanceof AbstractTaskElement) {
                    ((AbstractTaskElement) proxy).setExpect(expect);
                }
            }
        }
        super.execute();
    }
201540
public void addTaskStates(Collection<TaskState> taskStates) {
    for (TaskState taskState : taskStates) {
      this.taskStates.put(taskState.getTaskId(), taskState);
    }
  }
255179
private void createTaskSettings()
	{

		taskLimitationsLabel = new JLabel("Task Limitations (in byte)");
		taskLimitationsLabel.setBounds(10, 10, 250, 25);
		this.add(taskLimitationsLabel);

		articleTaskLabel = new JLabel("Article-Task: ");
		articleTaskLabel.setBorder(BorderFactory.createRaisedBevelBorder());
		articleTaskLabel.setBounds(10, 40, 100, 25);
		this.add(articleTaskLabel);

		articleTaskLimitField = new JTextField();
		articleTaskLimitField.setBounds(120, 40, 200, 25);
		this.add(articleTaskLimitField);

		diffTaskLabel = new JLabel("Diff-Task: ");
		diffTaskLabel.setBorder(BorderFactory.createRaisedBevelBorder());
		diffTaskLabel.setBounds(10, 70, 100, 25);
		this.add(diffTaskLabel);

		diffTaskLimitField = new JTextField();
		diffTaskLimitField.setBounds(120, 70, 200, 25);
		this.add(diffTaskLimitField);
	}
160909
public function setTaskOptions($taskName, $options)
    {
        $baseTask = $taskName;
        if (isset($this->tasks['defined'][$taskName]) && is_array($this->tasks['defined'][$taskName])) {
            $definedTask = $this->tasks['defined'][$taskName];
            $baseTask = $definedTask['task'];
            if (is_array($definedTask['options'])) {
                $options = array_merge_recursive($definedTask['options'], $options);
            }
        }
        $this->defineTask($taskName, $baseTask, $options);

        return $this;
    }
1267828
private void processOptions(OptionSet options) {
    Pseudorandom.get().setSeed(options.valueOf(randomSeed));

    if (opts.contains(CommonOptions.MAP_REDUCE)) {
      MapReduceConfiguration.setMapReduceExecutor(new LocalMapReduceExecutor(
          options.valueOf(mrMaxThreads), options.valueOf(mrMaxBatchesPerThread)));
    }

    if (opts.contains(CommonOptions.STOCHASTIC_GRADIENT) || opts.contains(CommonOptions.LBFGS)) {
      LogFunction log = null;
      if (parsedOptions.has(logBrief)) {
        log = new NullLogFunction();
      } else {
         log = new DefaultLogFunction(parsedOptions.valueOf(logInterval), false,
             options.valueOf(logParametersInterval), options.valueOf(logParametersDir));
      }
      LogFunctions.setLogFunction(log);
    }
  }
1204738
public void setTaskIds(java.util.Collection<String> taskIds) {
        if (taskIds == null) {
            this.taskIds = null;
            return;
        }

        this.taskIds = new java.util.ArrayList<String>(taskIds);
    }
312457
function Tasks (options) {
  var me = this;

  // properties
  this.tasks = {};
  this.options = {
    run: 'auto' // can be 'auto' or 'manual'
  };
  this.executed = false;

  // set options
  if (options) {
    this.setOptions(options);
  }

  // execute a function on next process tick which will execute the tasks
  // (when configured to be executed automatically)
  if (process && process.nextTick) {
    process.nextTick(function () {
      if (me.options.run == 'auto') {
        me.run();
      }
    });
  }
}
710569
private void processGeneralOptions(Configuration conf,
      CommandLine line) {
    if (line.hasOption("fs")) {
      FileSystem.setDefaultUri(conf, line.getOptionValue("fs"));
    }

    if (line.hasOption("jt")) {
      conf.set("mapred.job.tracker", line.getOptionValue("jt"));
    }
    if (line.hasOption("conf")) {
      String[] values = line.getOptionValues("conf");
      for(String value : values) {
        conf.addResource(new Path(value));
      }
    }
    try {
      if (line.hasOption("libjars")) {
        conf.set("tmpjars", 
                 validateFiles(line.getOptionValue("libjars"), conf));
        //setting libjars in client classpath
        URL[] libjars = getLibJars(conf);
        if(libjars!=null && libjars.length>0) {
          conf.setClassLoader(new URLClassLoader(libjars, conf.getClassLoader()));
          Thread.currentThread().setContextClassLoader(
              new URLClassLoader(libjars, 
                  Thread.currentThread().getContextClassLoader()));
        }
      }
      if (line.hasOption("files")) {
        conf.set("tmpfiles", 
                 validateFiles(line.getOptionValue("files"), conf));
      }
      if (line.hasOption("archives")) {
        conf.set("tmparchives", 
                  validateFiles(line.getOptionValue("archives"), conf));
      }
    } catch (IOException ioe) {
      System.err.println(StringUtils.stringifyException(ioe));
    }
    if (line.hasOption('D')) {
      String[] property = line.getOptionValues('D');
      for(String prop : property) {
        String[] keyval = prop.split("=", 2);
        if (keyval.length == 2) {
          conf.set(keyval[0], keyval[1]);
        }
      }
    }
    conf.setBoolean("mapred.used.genericoptionsparser", true);
  }
189478
function (options) {
        options = options || {};

        var utilExtensions = /%f|%e/g;
        var tasksByNames = {};

        var tasksPromises = Object.keys(options).map(function (name) {

            var task = {
                src: [],
                tpl: null,
                uni: {},
                srcIsNull: false
            };

            return Promise
                .resolve()
                .then(function () {
                    var item = options[name];
                    var src = typeof item.src !== 'undefined' ? item.src : item;

                    return resolveSrcString(src)
                      .then(function(srcStrings) {
                          task.srcIsNull = srcStrings === null;
                          task.src = task.src.concat(srcStrings);
                          task.tpl = item.tpl;
                      });
                })
                .then(function () {
                    var result;

                    while (result = utilExtensions.exec(task.tpl)) {
                        var type = result[0];
                        var unique = {};

                        if (task.uni[type]) {
                            continue;
                        }

                        unique.regex = new RegExp(result[0], "g");
                        unique.value = null;
                        task.uni[type] = unique;
                    }
                })
                .then(function () {
                    tasksByNames[name] = task;
                });
        });

        return Promise.all(tasksPromises)
            .then(function() {
               return tasksByNames;
        });
    }
691591
public void setOptionGroupOptionSettings(java.util.Collection<OptionGroupOptionSetting> optionGroupOptionSettings) {
        if (optionGroupOptionSettings == null) {
            this.optionGroupOptionSettings = null;
            return;
        }

        this.optionGroupOptionSettings = new com.amazonaws.internal.SdkInternalList<OptionGroupOptionSetting>(optionGroupOptionSettings);
    }