rubocop:enable Metrics/ParameterLists
187273
def create_context_location(source_input,
                                document: nil,
                                pointer_segments: [])
      source = if !document
                 Openapi3Parser::Document.new(source_input).root_source
               else
                 Openapi3Parser::Source.new(
                   source_input,
                   document,
                   Openapi3Parser::Document::ReferenceRegister.new
                 )
               end

      Openapi3Parser::Context::Location.new(source, pointer_segments)
    end
841134
def get_params(self):
        
        return self.enabled, self.size, self.chunk_delay, self.start_delay
110652
def for(metric_operation, metric_name = nil)
      list = if metric_name
               all.find { |manifest| manifest.metric_operation == metric_operation.to_s && manifest.metric_name == metric_name.to_s }
             else
               all.find_all { |manifest| manifest.metric_operation == metric_operation.to_s }
             end
      list
    end
401659
private void loadServerParameters() {
    serverParser.addArgument("-p", "--port").required(true)
        .help("Port to be assigned to the server.\n");
    serverParser.addArgument("-m", "--model").required(true)
        .help("Pass the model to do the tagging as a parameter.\n");
    serverParser.addArgument("--clearFeatures").required(false)
        .choices("yes", "no", "docstart").setDefault(Flags.DEFAULT_FEATURE_FLAG)
        .help(
            "Reset the adaptive features every sentence; defaults to 'no'; if -DOCSTART- marks"
                + " are present, choose 'docstart'.\n");
    serverParser
        .addArgument("-l", "--language").required(true).choices("ca", "de",
            "en", "es", "eu", "fr", "gl", "it", "nl", "pt", "ru")
        .help("Choose language.\n");
    serverParser.addArgument("-o", "--outputFormat").required(false)
        .choices("conll03", "conll02", "naf")
        .setDefault(Flags.DEFAULT_OUTPUT_FORMAT)
        .help("Choose output format; it defaults to NAF.\n");
    serverParser.addArgument("--lexer").choices("numeric")
        .setDefault(Flags.DEFAULT_LEXER).required(false)
        .help("Use lexer rules for NERC tagging; it defaults to false.\n");
    serverParser.addArgument("--dictTag").required(false).choices("tag", "post")
        .setDefault(Flags.DEFAULT_DICT_OPTION).help(
            "Choose to directly tag entities by dictionary look-up; if the 'tag' option is chosen, "
                + "only tags entities found in the dictionary; if 'post' option is chosen, it will "
                + "post-process the results of the statistical model.\n");
    serverParser.addArgument("--dictPath").required(false)
        .setDefault(Flags.DEFAULT_DICT_PATH).help(
            "Provide the path to the dictionaries for direct dictionary tagging; it ONLY WORKS if --dictTag "
                + "option is activated.\n");
  }
59116
def _init_params(self):
        
        assert self._kv_initialized, "Cannot initialize parameters in KVStore " \
                                     "when KVStore is not initialized."
        params_to_init = []
        if self._kvstore:
            for param in self._params_to_init:
                if param._deferred_init:
                    params_to_init.append(param)
                else:
                    param_arrays = param._check_and_get(param._data, list)
                    idx = self._param2idx[param.name]
                    self._kvstore.init(idx, param_arrays[0])
                    if param._stype == 'default':
                        self._kvstore.pull(idx, param_arrays, priority=-idx)

        self._params_to_init = params_to_init
405383
def index
      validate_arguments!

      app_buildpacks = api.get_app_buildpacks_v3(app)[:body]

      if app_buildpacks.nil? or app_buildpacks.empty?
        display("#{app} has no Buildpack URL set.")
      else
        styled_header("#{app} Buildpack URL#{app_buildpacks.size > 1 ? 's' : ''}")
        display_buildpacks(app_buildpacks.map{|bp| bp["buildpack"]["url"]}, "")
      end
    end
711328
def enable_irb
      IRB::Inspector.class_eval {
        unless method_defined?(:inspect_value_with_colour)
          alias_method :inspect_value_without_colour, :inspect_value

          def inspect_value_with_colour(value)
            Colours.colourize(inspect_value_without_colour(value))
          end
        end

        alias_method :inspect_value, :inspect_value_with_colour
      }
    end
616324
def do_metric_list(mc, args):
    ''''''
    fields = {}
    if args.name:
        fields['name'] = args.name
    if args.dimensions:
        fields['dimensions'] = utils.format_dimensions_query(args.dimensions)
    if args.limit:
        fields['limit'] = args.limit
    if args.offset:
        fields['offset'] = args.offset
    if args.starttime:
        _translate_starttime(args)
        fields['start_time'] = args.starttime
    if args.endtime:
        fields['end_time'] = args.endtime
    if args.tenant_id:
        fields['tenant_id'] = args.tenant_id

    try:
        metric = mc.metrics.list(**fields)
    except (osc_exc.ClientException, k_exc.HttpError) as he:
        raise osc_exc.CommandError('%s\n%s' % (he.message, he.details))
    else:
        if args.json:
            print(utils.json_formatter(metric))
            return
        cols = ['name', 'dimensions']
        formatters = {
            'name': lambda x: x['name'],
            'dimensions': lambda x: utils.format_dict(x['dimensions']),
        }
        if isinstance(metric, list):
            # print the list
            utils.print_list(metric, cols, formatters=formatters)
        else:
            # add the dictionary to a list, so print_list works
            metric_list = list()
            metric_list.append(metric)
            utils.print_list(
                metric_list,
                cols,
                formatters=formatters)
650527
def verify_parameters
      required_parameters.each do |name, wfparam|
        if wfparam.required? && (wfparam.value.nil? || wfparam.value.size == 0)
          fail(IOError, ERR[:param_verify_failed] << "#{name} required but not present.") # rubocop:disable Metrics/LineLength
        end
      end
    end
529757
def action_dispatch_params
      action_dispatch_params = env['action_dispatch.request.path_parameters'] || {}
      action_dispatch_params.inject({}) {|hash, (key, value)| hash[key.to_s] = value; hash }
    end
1161030
def method_missing(meth, *args, &block)
      raise NoMethodError, "undefined method #{meth} for #{self.class.to_s}" if WotApiRu::Constants::PATH[meth.to_sym].nil?
      options = args[0] || {}
      options[:application_id] ||= WotApiRu::Settings[:application_id]
      path = WotApiRu::Constants::HOST + WotApiRu::Constants::PATH[meth.to_sym]
      invoke(path, options)
    end
1050032
public void checkParameterizables() {
    LoggingConfiguration.setVerbose(Level.VERBOSE);
    knownParameterizables = new ArrayList<>();
    try {
      Enumeration<URL> us = getClass().getClassLoader().getResources(ELKIServiceLoader.RESOURCE_PREFIX);
      while(us.hasMoreElements()) {
        URL u = us.nextElement();
        if("file".equals(u.getProtocol())) {
          for(String prop : new File(u.toURI()).list()) {
            try {
              knownParameterizables.add(Class.forName(prop));
            }
            catch(ClassNotFoundException e) {
              LOG.warning("Service file name is not a class name: " + prop);
              continue;
            }
          }
        }
        else if(("jar".equals(u.getProtocol()))) {
          JarURLConnection con = (JarURLConnection) u.openConnection();
          try (JarFile jar = con.getJarFile()) {
            Enumeration<JarEntry> entries = jar.entries();
            while(entries.hasMoreElements()) {
              String prop = entries.nextElement().getName();
              if(prop.startsWith(ELKIServiceLoader.RESOURCE_PREFIX)) {
                prop = prop.substring(ELKIServiceLoader.RESOURCE_PREFIX.length());
              }
              else if(prop.startsWith(ELKIServiceLoader.FILENAME_PREFIX)) {
                prop = prop.substring(ELKIServiceLoader.FILENAME_PREFIX.length());
              }
              else {
                continue;
              }
              try {
                knownParameterizables.add(Class.forName(prop));
              }
              catch(ClassNotFoundException e) {
                LOG.warning("Service file name is not a class name: " + prop);
                continue;
              }
            }
          }
        }
      }
    }
    catch(IOException | URISyntaxException e) {
      throw new AbortException("Error enumerating service folders.", e);
    }

    final String internal = de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizer.class.getPackage().getName();
    for(final Class<?> cls : ELKIServiceRegistry.findAllImplementations(Object.class, false, false)) {
      // Classes in the same package are special and don't cause warnings.
      if(cls.getName().startsWith(internal)) {
        continue;
      }
      try {
        State state = State.NO_CONSTRUCTOR;
        state = checkV3Parameterization(cls, state);
        if(state == State.ERROR) {
          continue;
        }
        state = checkDefaultConstructor(cls, state);
        if(state == State.ERROR) {
          continue;
        }
        boolean expectedParameterizer = checkSupertypes(cls);
        if(state == State.NO_CONSTRUCTOR && expectedParameterizer) {
          LOG.verbose("Class " + cls.getName() + //
          " implements a parameterizable interface, but doesn't have a public and parameterless constructor!");
        }
        if(state == State.INSTANTIABLE && !expectedParameterizer) {
          LOG.verbose("Class " + cls.getName() + //
          " has a parameterizer, but there is no service file for any of its interfaces.");
        }
      }
      catch(NoClassDefFoundError e) {
        LOG.verbose("Class discovered but not found: " + cls.getName() + " (missing: " + e.getMessage() + ")");
      }
    }
  }
1199979
def parameters(self, params):
        
        array = JavaArray(jobject=JavaArray.new_instance("weka.core.setupgenerator.AbstractParameter", len(params)))
        for idx, obj in enumerate(params):
            array[idx] = obj.jobject
        javabridge.call(self.jobject, "setParameters", "([Lweka/core/setupgenerator/AbstractParameter;)V", array.jobject)
1048959
def generate_parameters params
      @parameters = {}
      @options = {}
      params.each_pair do |param, data|
        if data[:opt]
          # optimise this parameter
          if data[:values] 
            # definition has provided an array of values
            if !data[:values].is_a? Array
              raise TargetLoadError.new("'values' for parameter #{param} is not an array")
            end
            if data[:type] == 'integer'
              data[:values].each do |v|
                raise TypeLoadError.new("'values' for parameter #{param} expected integer") unless v.is_a? Integer
              end
            elsif data[:type] == 'string'
              data[:values].each do |v|
                raise TypeLoadError.new("'values' for parameter #{param} expected string") unless v.is_a? String
              end
            end
            @parameters[param] = data[:values]
          else
            # definition has specified a range
            min, max, step = data[:min], data[:max], data[:step]
            unless min && max
              raise TargetLoadError.new("min and max must be set for parameter #{param}") 
            end
            range = (min..max)
            range = range.step(step) if step
            @parameters[param] = range.to_a
          end
        else
          # present option to user
          @options[param] = data
        end
      end
    end
385253
def checkAndCreateParams(self, params):
        
        actual_params = self['parameters'].keys()
        for k, v in params.items():
            if k not in actual_params:
                self['parameters'].append({"name": k, "value": v})
        self.reload()
        return self['parameters'].keys() == params.keys()
491447
def param(name, text, scope=nil)
      Runner.instance.add_param name, text, scope
    end
200099
def call!(env)
      env['deas.logging'] = Proc.new{ |msg| } # no-op
      status, headers, body = super(env)
      request = Rack::Request.new(env)
      line_attrs = {
        'method'  => request.request_method,
        'path'    => request.path,
        'params'  => env['deas.params'],
        'splat'   => env['deas.splat'],
        'time'    => env['deas.time_taken'],
        'status'  => status
      }
      if env['deas.handler_class']
        line_attrs['handler'] = env['deas.handler_class'].name
      end
      if headers.key?('Location')
        line_attrs['redir'] = headers['Location']
      end
      log SummaryLine.new(line_attrs)
      [status, headers, body]
    end