Report a syntax using the given the position parameter and arguments,
unless one was already reported at the same position.
968333
protected void reportSyntaxError(int pos, String key, Object... args) {
        JCDiagnostic.DiagnosticPosition diag = new JCDiagnostic.SimpleDiagnosticPosition(pos);
        reportSyntaxError(diag, key, args);
    }
334509
def report(args):
    
    from jcvi.utils.table import tabulate

    p = OptionParser(report.__doc__)

    types = {"read":      ["padded_start", "padded_end", "orient"],
             "consensus": ["padded_consensus_start", "padded_consensus_end"],
             "quality"  : ["qual_clipping_start", "qual_clipping_end", "align_clipping_start", "align_clipping_end"]
            }
    valid_types = tuple(types.keys())
    p.add_option("--type", default="read", choices=valid_types,
            help="choose report type [default: %default]")

    opts, args = p.parse_args(args)

    if len(args) != 1:
        sys.exit(not p.print_help())

    acefile, = args
    ace = Ace.read(must_open(acefile))
    logging.debug('Loaded ace file {0}'.format(acefile))

    for c in ace.contigs:
        print(c.name)
        table = dict()
        if opts.type == "read":
            ps, pe = [], []
            ps = [read.padded_start for read in c.af]
            for i in xrange(1, len(ps)):
                pe.append(ps[i] - ps[i-1])
            pe.append(c.nbases)
            map = dict(zip(ps, pe))
            for i, read in enumerate(c.af):
                values = [str(x) for x in (read.padded_start, map[read.padded_start], read.coru)]
                for i, label in enumerate(types[opts.type]):
                    table[(str(read.name), label)] = values[i]
        elif opts.type == "consensus":
            for read in c.bs:
                values = [str(x) for x in (read.padded_start, read.padded_end)]
                for i, label in enumerate(types[opts.type]):
                    table[(str(read.name), label)] = values[i]
        elif opts.type == "quality":
            for read in c.reads:
                (r1, r2) = (read.rd, read.qa)
                values = [str(x) for x in (r2.qual_clipping_start, r2.qual_clipping_end, r2.align_clipping_start, r2.align_clipping_end)]
                for i, label in enumerate(types[opts.type]):
                    table[(str(r1.name), label)] = values[i]
        print(tabulate(table), "\n")
1219682
public void notice(SourcePosition pos, String key, Object... args) {
        printNotice(pos, getText(key, args));
    }
900069
def paramsReport(self):
        """"""
        report = {}
        for param in self._REPORTPARAMS:
            pvalue = getattr(self, param)
            if isinstance(pvalue, float):
                report[param] = pvalue
            elif isinstance(pvalue, scipy.ndarray) and pvalue.shape == (3, N_NT):
                for p in range(3):
                    for w in range(N_NT - 1):
                        report['{0}{1}{2}'.format(param, p, INDEX_TO_NT[w])] =\
                                pvalue[p][w]
            else:
                raise ValueError("Unexpected param: {0}".format(param))
        return report
465705
private void emit(int pos, int end, String arg) {
    while (pos < end) {
      char ch = format.charAt(pos);
      if (ch == '#') {
        buf.append(arg == null ? ch : arg);
      } else {
        buf.append(ch);
      }
      pos++;
    }
  }
1197742
public void assertAtLeastOneDefined(final String param1, final String... moreParams) {
    if (!isPresent(param1)) {
      for (final String moreParam : moreParams) {
        if (isPresent(moreParam)) {
          return;
        }
      }
      final List<String> paramsForError = Lists.newArrayList();
      paramsForError.add(param1);
      paramsForError.addAll(Arrays.asList(moreParams));
      throw new ParameterException(
          String.format("At least one of %s must be defined.",
              StringUtils.CommaSpaceJoiner.join(paramsForError)));
    }
  }
1059872
def pout(*args, **kwargs):
    """"""
    if should_msg(kwargs.get("groups", ["normal"])):
        args = indent_text(*args, **kwargs)

        # write to stdout
        sys.stderr.write("".join(args))
        sys.stderr.write("\n")
887732
function Reporter(options) {
    options = options || {};

    this._options = options;
    this._results = options.results || [];
    this._rule = options.rule || null;
    this._cfg = options.cfg || null;
}
765759
function report(reference) {
            context.report({
                node: reference.identifier,
                loc: reference.identifier.loc,
                message: "Use the rest parameters instead of 'arguments'."
            });
        }
351164
def report(self, string='', level=0, prelude='', progress=False, abbreviate=True):
        ''''''
        if self._mute == False:
            self._prefix = prelude + '{spacing}[{name}] '.format(name = self.nametag, spacing = ' '*level)
            self._prefix = "{0:>16}".format(self._prefix)
            equalspaces = ' '*len(self._prefix)
            toprint = string + ''
            if abbreviate:
                if shortcuts is not None:
                    for k in shortcuts.keys():
                        toprint = toprint.replace(k, shortcuts[k])

            if progress:
                print('\r' + self._prefix + toprint.replace('\n', '\n' + equalspaces),)
            else:
                print(self._prefix + toprint.replace('\n', '\n' + equalspaces))
239781
def parameter(self, parser):
        
        return (Suppress(self.syntax.params_start).leaveWhitespace() +
                Group(parser) + Suppress(self.syntax.params_stop))
684718
def report(     callingClass,
                astr_key,
                ab_exitToOs     = 1,
                astr_header     = "",
                **kwargs
                ):
    '''
    

    '''

    astr_header         = ""
    ab_exitToOS         = False
    ab_drawBox          = False
    for k, v in kwargs.items():
        if k == 'header':   astr_header     = v
        if k == 'exitToOS': ab_exitToOS     = v
        if k == 'drawBox':  ab_drawBox      = v

    if ab_drawBox:
        log     = slog()
    else:
        log     = Message()

    b_syslog    = log.syslog()
    log.syslog(False)
    if ab_exitToOS: log( Colors.RED +    ":: FATAL ERROR :: " + Colors.NO_COLOUR )
    else:           log( Colors.YELLOW + "::   WARNING   :: " + Colors.NO_COLOUR )
    if len(astr_header): log( Colors.BROWN + astr_header + Colors.NO_COLOUR )
    log( "\n" )
    log( "\tSorry, some error seems to have occurred in:\n\n\t\t<" )
    try:
        caller = inspect.stack()[3][4][0].strip()
    except:
        caller = '__main__'
    log( Colors.LIGHT_GREEN + ("%s" % callingClass.__class__.__name__) + Colors.NO_COLOUR + "::")
    log( Colors.LIGHT_CYAN + ("%s" % caller) + Colors.NO_COLOUR)
    log( ">\n\n")

    log( "\tWhile %s\n" % callingClass._dictErr[astr_key]['action'] )
    log( "\t%s\n" % callingClass._dictErr[astr_key]['error'] )
    log( "\n" )
    log( "Returning with error code %s%d%s" % (
                    Colors.YELLOW,
                    callingClass._dictErr[astr_key]['exitCode'],
                    Colors.NO_COLOUR
                    )
    )

    if ab_drawBox:
        print(log.border_draw())
    if ab_exitToOS:
        sys.exit( callingClass._dictErr[astr_key]['exitCode'] )
    log.syslog(b_syslog)
    return callingClass._dictErr[astr_key]['exitCode']
397834
private void reportBugs() {
        Iterator<Map.Entry<Integer, Map<JavaClass, List<MethodInfo>>>> it = parameterDefiners.entrySet().iterator();
        while (it.hasNext()) {
            try {
                Map.Entry<Integer, Map<JavaClass, List<MethodInfo>>> entry = it.next();

                Integer reg = entry.getKey();
                if (!usedParameters.get(reg.intValue())) {
                    it.remove();
                    continue;
                }
                Map<JavaClass, List<MethodInfo>> definers = entry.getValue();
                definers.remove(objectClass);
                if (definers.size() > 1) {
                    removeInheritedInterfaces(definers);
                }

                if ((definers.size() == 1) && !hasOverloadedMethod()) {

                    String name = "";
                    LocalVariableTable lvt = getMethod().getLocalVariableTable();
                    if (lvt != null) {
                        LocalVariable lv = lvt.getLocalVariable(reg.intValue(), 0);
                        if (lv != null) {
                            name = lv.getName();
                        }
                    }
                    int parm = reg.intValue();
                    if (!methodIsStatic) {
                        parm--;
                    }

                    parm++; // users expect 1 based parameters

                    String infName = definers.keySet().iterator().next().getClassName();
                    bugReporter.reportBug(
                            new BugInstance(this, BugType.OCP_OVERLY_CONCRETE_PARAMETER.name(), NORMAL_PRIORITY)
                                    .addClass(this).addMethod(this).addSourceLine(this, 0)
                                    .addString(getCardinality(parm) + " parameter '" + name + "' could be declared as "
                                            + infName + " instead"));
                }
            } catch (ClassNotFoundException e) {
                bugReporter.reportMissingClass(e);
            }
        }
    }
774328
def process_args(pos_vals, kw_vals, rest_vals)
            result = {}

            # Process positional arguments
            pos_args = @definition.positional_args
            pos_args.each_with_index do |arg, i|
                break if i >= pos_vals.length
                result[arg.key] = process_arg_val(arg, pos_vals[i], result)
            end
            if pos_vals.size > pos_args.size
                if @definition.rest_args?
                    rest_vals = pos_vals[pos_args.size..-1] + rest_vals
                else
                    self.errors << "#{pos_vals.size} positional #{pos_vals.size == 1 ? 'argument' : 'arguments'} #{
                        pos_vals.size == 1 ? 'was' : 'were'} supplied, but only #{pos_args.size} #{
                        pos_args.size == 1 ? 'is' : 'are'} defined"
                end
            end

            # Process key-word based arguments
            kw_vals.each do |arg, val|
                result[arg.key] = process_arg_val(arg, val, result)
            end

            # Process rest values
            if rest_vals.size > 0
                if rest_arg = @definition.rest_args
                    result[rest_arg.key] = process_arg_val(rest_arg, rest_vals, result)
                else
                    self.errors << "#{rest_vals.size} rest #{rest_vals.size == 1 ? 'value' : 'values'} #{
                        rest_vals.size == 1 ? 'was' : 'were'} supplied, but no rest argument is defined"
                end
            end

            # Default unspecified arguments
            @definition.args.select{ |arg| !result.has_key?(arg.key) }.each do |arg|
                result[arg.key] = process_arg_val(arg, arg.default, result, true)
            end

            # Validate if any set requirements have been satisfied
            self.errors.concat(@definition.validate_requirements(result))
            if self.errors.size > 0
                @show_usage = true
            elsif result.empty?
                EmptyArgs.new
            else
                props = result.keys
                @definition.args.each{ |arg| props << arg.key unless result.has_key?(arg.key) }
                args = Struct.new(*props)
                args.new(*result.values)
            end
        end
643419
private OperatorSymbol reportErrorIfNeeded(DiagnosticPosition pos, Tag tag, Type... args) {
        if (Stream.of(args).noneMatch(Type::isErroneous)) {
            Name opName = operatorName(tag);
            JCDiagnostic.Error opError = (args.length) == 1 ?
                    Errors.OperatorCantBeApplied(opName, args[0]) :
                    Errors.OperatorCantBeApplied1(opName, args[0], args[1]);
            log.error(pos, opError);
        }
        return noOpSymbol;
    }
767375
function report(node) {
            const leftParenToken = sourceCode.getTokenBefore(node);
            const rightParenToken = sourceCode.getTokenAfter(node);

            if (!isParenthesisedTwice(node)) {
                if (tokensToIgnore.has(sourceCode.getFirstToken(node))) {
                    return;
                }

                if (isIIFE(node) && !isParenthesised(node.callee)) {
                    return;
                }
            }

            context.report({
                node,
                loc: leftParenToken.loc.start,
                messageId: "unexpected",
                fix(fixer) {
                    const parenthesizedSource = sourceCode.text.slice(leftParenToken.range[1], rightParenToken.range[0]);

                    return fixer.replaceTextRange([
                        leftParenToken.range[0],
                        rightParenToken.range[1]
                    ], (requiresLeadingSpace(node) ? " " : "") + parenthesizedSource + (requiresTrailingSpace(node) ? " " : ""));
                }
            });
        }
811144
def value_check(arg_name, pos, allowed_values):
    

    def decorator(fn):

        # brevity compromised in favour of readability
        def logic(*args, **kwargs):
            arg_count = len(args)
            if arg_count:
                if pos < arg_count:
                    if args[pos] in allowed_values:
                        return fn(*args, **kwargs)
                    else:
                        raise ValueError(
                            "'{0}' at position {1} not in allowed values {2}".format(args[pos], pos, allowed_values))
                else:
                    if arg_name in kwargs:
                        value = kwargs[arg_name]
                        if value in allowed_values:
                            return fn(*args, **kwargs)
                        else:
                            raise ValueError("'{0}' is not an allowed kwarg".format(arg_name))
                    else:
                        # partially applied functions because of incomplete args, let python handle this
                        return fn(*args, **kwargs)
            else:
                if arg_name in kwargs:
                    value = kwargs[arg_name]
                    if value in allowed_values:
                        return fn(*args, **kwargs)
                else:
                    raise ValueError("'{0}' is not an allowed kwarg".format(arg_name))

        return logic

    return decorator