<commit_before>var Q = require('q'),
    Parent = require('heinzelmannchen-generator'),
    pg2json = require('pg2json'),
    connection = require('pg2json/lib/connection'),
    tables = require('pg2json/lib/tables'),
    Generator = Parent.inherit();

Generator.prototype.createData = function() {
    return connection.connect(this.config)
        .then(function() {
            var tableNames = null;
            if (this.filters) {
                tableNames = this.filters.tables;
            }
            return tables.get(tableNames);
        })
        .then(function(tables) {
            return tables;
        });
};

Generator.prototype.explain = function() {
    var text = ['[{',
        '\ttable_name: "a-table-name",',<commit_msg>fixes scoping problem<commit_after>var Q = require('q'),
    Parent = require('heinzelmannchen-generator'),
    pg2json = require('pg2json'),
    connection = require('pg2json/lib/connection'),
    tables = require('pg2json/lib/tables'),
    Generator = Parent.inherit();

Generator.prototype.createData = function() {
    var me = this;
    return connection.connect(this.config)
        .then(function() {
            var tableNames = null;
            if (me.filters) {
                tableNames = me.filters.tables;
            }
            return tables.get(tableNames);
        })
        .then(function(tables) {
            return tables;
        });
};

Generator.prototype.explain = function() {
    var text = ['[{',
        '\ttable_name: "a-table-name",',
{'fraction_non_alphanumeric': 0.14502307185234015, 'fraction_numerical': 0.005273566249176005, 'mean_word_length': 2.3216630196936543, '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': '6373882', 'n_tokens_mistral': 434, 'n_tokens_neox': 427, 'n_words': 76}