Use parameters when given, otherwise we use the string directly
773803
private String format(String message, Object[] params) {
        if (params.length == 0) {
            return message;
        } else if (params.length == 1 && params[0] instanceof Throwable) {
            // We print only the message here since breaking exception will bubble up
            // anyway
            return message + ": " + params[0].toString();
        } else {
            return String.format(message, params);
        }
    }
17094
def get_params(self, *args, **kwargs):
        '''
        
        '''
        kwargs.update(self._data)
        if args and kwargs:
            raise ValueError('Cannot mix positional and named parameters')
        if args:
            return list(args)
        else:
            return kwargs
354301
def to_param(args)
        case args
        when String
          define_method "to_param" do
            args.gsub(/:(\w+)/) {|method| send(method[1..-1]).to_s.parameterize }
          end

          if args.empty?
            raise ArgumentError.new("args can not be an empty string")
          end
        when Symbol
          define_method "to_param" do
            "#{id}-#{send(args).parameterize}"
          end
        else
          raise ArgumentError.new("args can only be string or symbol")
        end
    end
339556
def _resolveParam(self, param):
        
        if isinstance(param, Param):
            self._shouldOwn(param)
            return param
        elif isinstance(param, basestring):
            return self.getParam(param)
        else:
            raise ValueError("Cannot resolve %r as a param." % param)
855520
def setParams(self, inputCol=None, outputCol=None, stopWords=None, caseSensitive=False,
                  locale=None):
        
        kwargs = self._input_kwargs
        return self._set(**kwargs)
1227164
def process_literal_param(self, value: Optional[List[int]],
                              dialect: Dialect) -> str:
        """"""
        retval = self._intlist_to_dbstr(value)
        return retval
11039
def set_params(self, prog=None, params=""):
        
        dest_prog = "to {0}".format(prog) if prog else ""
        self.add_option("--params", dest="extra", default=params,
                help="Extra parameters to pass {0}".format(dest_prog) + \
                     " (these WILL NOT be validated)")
86608
public void addHiddenParam(PrintWriter out, String strParam, String strValue)
    {
        // Override this (if you don't want straight XML written)
        out.print("<param name=\"" + strParam + "\">");
        if (strValue != null)
            out.print(strValue);
        out.println(Utility.endTag("param"));
    }
109785
def make_query_string(params)
      clean_params(params).collect do |k, v|
        CGI.escape(k) + '=' + CGI.escape(v)
      end.join('&')
    end
912966
private String parameterToString(Object param) {
        if (param == null) {
            return "";
        } else if (param instanceof Date) {
            return formatDate((Date) param);
        } else if (param instanceof Collection) {
            StringBuilder b = new StringBuilder();
            for (Object o : (Collection) param) {
                if (b.length() > 0) {
                    b.append(",");
                }
                b.append(String.valueOf(o));
            }
            return b.toString();
        } else {
            return String.valueOf(param);
        }
    }
865866
def do_parameter(self,args):
        """"""
        parser = CommandArgumentParser("parameter")
        parser.add_argument(dest="id",help="Parameter to print")
        args = vars(parser.parse_args(args))
        
        print "printing parameter {}".format(args['id'])
        try:
            index = int(args['id'])            
            parameter = self.wrappedStack['resourcesByTypeName']['parameters'][index]
        except ValueError:
            parameter = self.wrappedStack['resourcesByTypeName']['parameters'][args['id']]

        print(parameter.resource_status)
978502
def insert_param(self, param):
        
        self._current_params = tuple([param] + list(self._current_params))
1117729
function(str, methodDec, methodName, method, methodsMap, options){
    var methodValue = getMethodValue(methodDec, methodName, method, methodsMap, options);
    if(str === methodDec) return methodValue;
    return str.replace(methodDec, function(){ return methodValue; });
  }
1262358
def set_params(method, params):
    """"""
    data = {'method': method, 'params': params, 'id': str(uuid4())}
    return json.dumps(data)
558834
def query_string(context, **kwargs):
    """"""
    params = context["request"].GET.copy()

    for key, value in list(kwargs.items()):
        params[key] = value

    return "?" + params.urlencode()
1096042
def method_missing(name, *args)
      name = name.to_s
      last_char = name[-1,1]
      super(name, *args) unless last_char == "=" || last_char == "?"
      attr_name = name[0..-2].to_sym # :foo for 'foo=' or 'foo?'
      if last_char == "="
        @options[attr_name] = args.at(0)
      else
        @options[attr_name]
      end
    end
290282
def _capture_variable(iterator, parameters):
    
    key = ""
    next_c = next(iterator)
    while next_c != "}":
        key += next_c
        next_c = next(iterator)
    # remove the final "}"
    next(iterator)
    return parameters[key]