<commit_before>var _ = require('underscore'),
    step = require('step'),
    fileUtils = require('../fileUtils'),
    error = require('../error'),
    assets = require('../assets'),
    query = require('../query');

exports.populate = function (includeRelationQuery) {
    var includeRelationMatcher = query.queryObjToMatcherFunction(includeRelationQuery);
    return function populate(err, assetGraph, cb) {
        var assetQueue = assetGraph.findAssets({isInitial: true}),
            numWaitingCallbacks = 0,
            callbackCalled = false;

        cb = error.onlyCallOnce(cb);

        (function proceed() {
            numWaitingCallbacks += assetQueue.length;
            while (assetQueue.length) {
                processAsset(assetQueue.shift(), function (err) {<commit_msg>transforms.populate: Removed hardcoded {isInitial:true} query.<commit_after>var _ = require('underscore'),
    step = require('step'),
    fileUtils = require('../fileUtils'),
    error = require('../error'),
    assets = require('../assets'),
    query = require('../query');

exports.populate = function (includeRelationQuery, initialAssetsQuery) { // includeRelationQuery and initialAssetsQuery are optional
    var includeRelationMatcher = query.queryObjToMatcherFunction(includeRelationQuery);
    return function populate(err, assetGraph, cb) {
        var assetQueue = assetGraph.findAssets(initialAssetsQuery),
            numWaitingCallbacks = 0,
            callbackCalled = false;

        cb = error.onlyCallOnce(cb);

        (function proceed() {
            numWaitingCallbacks += assetQueue.length;
            while (assetQueue.length) {
                processAsset(assetQueue.shift(), function (err) {
{'fraction_non_alphanumeric': 0.1239766081871345, 'fraction_numerical': 0.0011695906432748538, 'mean_word_length': 3.1630170316301705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7430241', 'n_tokens_mistral': 455, 'n_tokens_neox': 443, 'n_words': 93}