test:* → [test:lint, test:client] test:** → [test:lint, test:client, test:client:fx]
509093
function expandWildcard (name, scripts) {
  const n = swapColonAndSlash(name)
  return Object.keys(scripts)
    .map(swapColonAndSlash)
    .filter(x => minimatch(x, n))
    .map(swapColonAndSlash)
}
993877
function $(tok) {
        var match, length, c, endIndex;

        // Non-terminal
        if (tok instanceof Function) {
            return tok.call(parser.parsers);
        // Terminal
        // Either match a single character in the input,
        // or match a regexp in the current chunk (chunk[j]).
        } else if (typeof(tok) === 'string') {
            match = input.charAt(i) === tok ? tok : null;
            length = 1;
            sync();
        } else {
            sync();

            match = tok.exec(chunks[j]);
            if (match) {
                length = match[0].length;
            } else {
                return null;
            }
        }

        // The match is confirmed, add the match length to `i`,
        // and consume any extra white-space characters (' ' || '\n')
        // which come after that. The reason for this is that LeSS's
        // grammar is mostly white-space insensitive.
        if (match) {
            var mem = i += length;
            endIndex = i + chunks[j].length - length;

            while (i < endIndex) {
                c = input.charCodeAt(i);
                if (! (c === 32 || c === 10 || c === 9)) { break; }
                i++;
            }
            chunks[j] = chunks[j].slice(length + (i - mem));
            current = i;

            if (chunks[j].length === 0 && j < chunks.length - 1) { j++; }

            if (typeof(match) === 'string') {
                return match;
            } else {
                return match.length === 1 ? match[0] : match;
            }
        }
    }
555590
function dfl(a, b, c) {
        switch (arguments.length) {
            case 2: return a != null ? a : b;
            case 3: return a != null ? a : b != null ? b : c;
            default: throw new Error("Implement me");
        }
    }
56159
function lintAllFiles (src, options)
{
    glob(src,
        function (err, files)
        {
            if (err) throw err;

            for (var i = 0, l = files.length; i < l; i++)
            {
                jsHintHelper.lintFile(files[i], options.rules);
            }
        }
    );
}
1290334
function ParserInline() {
  var i;

  /**
   * ParserInline#ruler -> Ruler
   *
   * [[Ruler]] instance. Keep configuration of inline rules.
   **/
  this.ruler = new Ruler();

  for (i = 0; i < _rules.length; i++) {
    this.ruler.push(_rules[i][0], _rules[i][1]);
  }

  /**
   * ParserInline#ruler2 -> Ruler
   *
   * [[Ruler]] instance. Second ruler used for post-processing
   * (e.g. in emphasis-like rules).
   **/
  this.ruler2 = new Ruler();

  for (i = 0; i < _rules2.length; i++) {
    this.ruler2.push(_rules2[i][0], _rules2[i][1]);
  }
}
459180
function(test) {
			var context = this.loopContext;
			var forkContext = this.forkContext;
			var testSegments = forkContext.makeNext(0, -1);

			// Update state.
			context.test = test;
			context.continueDestSegments = testSegments;
			forkContext.replaceHead(testSegments);
		}
1123018
private String[] parseLine(String nextLine, boolean multi) throws IOException {

        if (!multi && pending != null) {
            pending = null;
        }

        if (nextLine == null) {
            if (pending != null) {
                String s = pending;
                pending = null;
                return new String[]{s};
            } else {
                return null;
            }
        }

        List<String> tokensOnThisLine = new ArrayList<String>();
        StringBuilder sb = new StringBuilder(INITIAL_READ_SIZE);
        boolean inQuotes = false;
        if (pending != null) {
            sb.append(pending);
            pending = null;
            inQuotes = true;
        }
        for (int i = 0; i < nextLine.length(); i++) {

            char c = nextLine.charAt(i);
            if (c == this.escape) {
                if (isNextCharacterEscapable(nextLine, inQuotes || inField, i)) {
                    sb.append(nextLine.charAt(i + 1));
                    i++;
                }
            } else if (c == quotechar) {
                if (isNextCharacterEscapedQuote(nextLine, inQuotes || inField, i)) {
                    sb.append(nextLine.charAt(i + 1));
                    i++;
                } else {
                    //inQuotes = !inQuotes;

                    // the tricky case of an embedded quote in the middle: a,bc"d"ef,g
                    if (!strictQuotes) {
                        if (i > 2 //not on the beginning of the line
                                && nextLine.charAt(i - 1) != this.separator //not at the beginning of an escape sequence
                                && nextLine.length() > (i + 1) &&
                                nextLine.charAt(i + 1) != this.separator //not at the	end of an escape sequence
                                ) {

                            if (ignoreLeadingWhiteSpace && sb.length() > 0 && isAllWhiteSpace(sb)) {
                                sb.setLength(0);  //discard white space leading up to quote
                            } else {
                                sb.append(c);
                                //continue;
                            }

                        }
                    }

                    inQuotes = !inQuotes;
                }
                inField = !inField;
            } else if (c == separator && !inQuotes) {
                tokensOnThisLine.add(sb.toString());
                sb.setLength(0); // start work on next token
                inField = false;
            } else {
                if (!strictQuotes || inQuotes) {
                    sb.append(c);
                    inField = true;
                }
            }
        }
        // line is done - check status
        if (inQuotes) {
            if (multi) {
                // continuing a quoted section, re-append newline
                sb.append("\n");
                pending = sb.toString();
                sb = null; // this partial content is not to be added to field list yet
            } else {
                throw new IOException("Un-terminated quoted field at end of CSV line");
            }
        }
        if (sb != null) {
            tokensOnThisLine.add(sb.toString());
        }
        return tokensOnThisLine.toArray(new String[tokensOnThisLine.size()]);

    }
1209456
def literal(compiler, cont, arg):
  ''''''
  text = compiler.new_var(il.ConstLocalVar('text'))
  pos = compiler.new_var(il.ConstLocalVar('pos'))
  p = compiler.new_var(il.LocalVar('p'))
  i = compiler.new_var(il.LocalVar('i'))
  x = compiler.new_var(il.ConstLocalVar('x'))
  length = compiler.new_var(il.ConstLocalVar('length'))  
  length2 = compiler.new_var(il.ConstLocalVar('length2'))  
  if isinstance(arg, Var):
    return il.Begin((
      il.Assign(x, il.Deref(arg)),
      il.AssignFromList(text, pos, il.parse_state),
      il.Assign(length, il.Len(text)),
      il.Assign(length, il.Len(x)),
      il.Assign(i, il.Integer(0)),
      il.Assign(p, pos),
      il.while_(il.and_(il.Lt(i, length2), il.Lt(p, length), il.Eq(il.GetItem(text, p), il.GetItem(x, i))), 
        il.AddAssign(p, il.Integer(1))),
      il.If(il.Lt(i, length2), 
        il.failcont(il.NONE),
        il.begin(il.append_failcont(compiler, 
          il.SetParseState(il.Tuple(text, pos))),
          il.SetParseState(il.Tuple(text, p)),
          cont(arg)))))
  elif isinstance(arg, String):
    arg = arg.interlang()
    return il.Begin((
      il.AssignFromList(text, pos, il.parse_state),
      il.Assign(length, il.Len(text)),
      il.Assign(length2, il.Len(arg)),
      il.Assign(i, il.Integer(0)),
      il.Assign(p, pos),
      il.while_(il.and_(il.Lt(i, length2), il.Lt(p, length), il.Eq(il.GetItem(text, p), il.GetItem(arg, i))), 
        il.AddAssign(p, il.Integer(1)),
        il.AddAssign(i, il.Integer(1)),
        ),
      il.If(il.Lt(i, length2), 
        il.failcont(il.NONE),
        il.begin(il.append_failcont(compiler, 
          il.SetParseState(il.Tuple(text, pos))),
          il.SetParseState(il.Tuple(text, p)),
          cont(arg)))))
  else:
    raise CompileTypeError
335371
function parseDoWhileStatement() {
        var body, test, oldInIteration;

        expectKeyword('do');

        oldInIteration = state.inIteration;
        state.inIteration = true;

        body = parseStatement();

        state.inIteration = oldInIteration;

        expectKeyword('while');

        expect('(');

        test = parseExpression();

        expect(')');

        if (match(';')) {
            lex();
        }

        return delegate.createDoWhileStatement(body, test);
    }
923446
public void excl(int x) {
        Assert.check(currentState != BitsState.UNKNOWN);
        Assert.check(x >= 0);
        sizeTo((x >>> wordshift) + 1);
        bits[x >>> wordshift] = bits[x >>> wordshift] &
            ~(1 << (x & wordmask));
        currentState = BitsState.NORMAL;
    }
1110302
def char_on_predicate(compiler, cont, test):
  ''''''
  test = test.interlang()
  text = compiler.new_var(il.ConstLocalVar('text'))
  pos = compiler.new_var(il.ConstLocalVar('pos'))
  if not isinstance(test, il.PyFunction):
    raise DaoCompileTypeError(test)
  return il.Begin((
    il.AssignFromList(text, pos, il.parse_state),
    il.If(il.Ge(pos,il.Len(text)), 
      il.failcont(il.FALSE),
      il.If(il.Call(test, il.GetItem(text, pos)),
        il.begin(
          il.SetParseState(il.Tuple(text, il.add(pos, il.Integer(1)))),
          il.append_failcont(compiler, 
                             il.SetParseState(il.Tuple(text, pos))),
          cont(il.GetItem(text, pos))),
        il.failcont(il.FALSE)))))
235784
function quotes(node, index, parent) {
  var siblings = parent.children
  var value = node.value
  var next
  var nextNext
  var prev
  var nextValue

  if (value !== doubleQuote && value !== singleQuote) {
    return
  }

  prev = siblings[index - 1]
  next = siblings[index + 1]
  nextNext = siblings[index + 2]
  nextValue = next && nlcstToString(next)

  if (
    next &&
    nextNext &&
    (next.type === punctuation || next.type === symbol) &&
    nextNext.type !== word
  ) {
    // Special case if the very first character is a quote followed by
    // punctuation at a non-word-break. Close the quotes by brute force.
    node.value = closingQuotes[value]
  } else if (
    nextNext &&
    (nextValue === doubleQuote || nextValue === singleQuote) &&
    nextNext.type === word
  ) {
    // Special case for double sets of quotes:
    // `He said, "'Quoted' words in a larger quote."`
    node.value = openingQuotes[value]
    next.value = openingQuotes[nextValue]
  } else if (next && decadeExpression.test(nextValue)) {
    // Special case for decade abbreviations: `the '80s`
    node.value = closingQuotes[value]
  } else if (
    prev &&
    next &&
    (prev.type === whiteSpace ||
      prev.type === punctuation ||
      prev.type === symbol) &&
    next.type === word
  ) {
    // Get most opening single quotes.
    node.value = openingQuotes[value]
  } else if (
    prev &&
    (prev.type !== whiteSpace &&
      prev.type !== symbol &&
      prev.type !== punctuation)
  ) {
    // Closing quotes.
    node.value = closingQuotes[value]
  } else if (
    !next ||
    next.type === whiteSpace ||
    ((value === singleQuote || value === apostrophe) && nextValue === 's')
  ) {
    node.value = closingQuotes[value]
  } else {
    node.value = openingQuotes[value]
  }
}
1253307
function WriteFteTable() {
  for (var i = 0; i < test_languages.length; i++) {
    var retval = '';
    retval += '<tr id="fte_row' + i + '">';
    retval += '<td class="obfuscatorName">fte</td>';
    retval += '<td class="testNum">' + test_languages[i]['description'] + '</td>';
    retval += '<td class="testProto">' + test_languages[i]['protocol'] + '</td>';
    retval += '<td class="testInputLanguage">(' + test_languages[i][
      'plaintext_regex'
    ].substr(0,16) + ', ' + test_languages[i]['plaintext_max_len'] + ')</td>';
    if (test_languages[i]['protocol'] == "stream cipher") {
      retval += '<td class="testInputLaguage">(^.+$, ' + test_languages[i]['ciphertext_max_len'] + ')</td>';
    } else {
      retval += '<td class="testInputLaguage">(-, ' + test_languages[i]['ciphertext_max_len'] + ')</td>';
    }
    retval += '<td class="testCost">';
    retval += '-';
    retval += '</td>';
    retval += '<td class="testBandwidth">';
    retval += '-';
    retval += '</td>';
    retval += '</tr>';

    document.getElementById('FteBenchmarkResults').innerHTML += retval;
  }
}
166453
function(line, index, lines) {
        var hasPipe = /^\s*\|\>/;
        var nextLine = lines[index + 1] || '';

        if (line.match(hasPipe)|| !nextLine.match(hasPipe)) {
          return line;
        }
        // handle wrapping returned values
        else if (line.match(/^\s*return/)) { // starts with return
          return line.replace(/^return (.+)/, function($0, $1) {
              return 'return _.chain(' + $1 +')';
          });
        }
        // handle wrapping assignments eg, foo = [1, 2, 3]
        else if (line.match(/^\s*[\w$]+\s+\=\s+/)) { // starts with `foo =`
          return line.replace(/(^\s*[\w$]+\s+\=\s+)(.+)/, function($0, $1, $2) {
              return $1 + '_.chain(' + $2 +')';
          });
        }
        else if (!!line.trim()) {
          return '_.chain(' + line + ')';
        }
        else {
          return line;
        }
    }
877875
function lint(p) {
  return () => {
    gulp.src(p).pipe(g.eslint())
      .pipe(g.eslint.format())
      .pipe(g.eslint.failOnError());
  };
}
835236
function (name, test) {
                        try {
                            if (_.isFunction (test)) {                               test () }
                                                else { _.each (test, function (fn) { fn () }) } }
                        catch (e) {
                            if (_.isAssertionError (e)) { var printedName = ((_.isArray (name) && name) || [name]).join ('.')
                                                          console.log (printedName + ':', e.message, '\n' + _.times (printedName.length, _.constant ('~')).join ('') + '\n')
                                                         _.each (e.notMatching, function (x) { console.log ('  •', x) }) }
                            throw e } }
1347149
function matchImmediate(el, match) {
        var matched = 1, startEl = el, relativeOp, startMatch = match;
        do {
            matched &= singleMatch(el, match);
            if (matched) {
                // advance
                match = match && match.prev;
                if (!match) {
                    return true;
                }
                relativeOp = relativeExpr[match.nextCombinator];
                el = dir(el, relativeOp.dir);
                if (!relativeOp.immediate) {
                    return {
                        // advance for non-immediate
                        el: el,
                        match: match
                    };
                }
            } else {
                relativeOp = relativeExpr[match.nextCombinator];
                if (relativeOp.immediate) {
                    // retreat but advance startEl
                    return {
                        el: dir(startEl, relativeExpr[startMatch.nextCombinator].dir),
                        match: startMatch
                    };
                } else {
                    // advance (before immediate match + jump unmatched)
                    return {
                        el: el && dir(el, relativeOp.dir),
                        match: match
                    };
                }
            }
        } while (el);    // only occur when match immediate
        // only occur when match immediate
        return {
            el: dir(startEl, relativeExpr[startMatch.nextCombinator].dir),
            match: startMatch
        };
    }