<commit_before>var request = require('request')
  , parsers = {};

var versionParser = {
  'PHP5 Old Stable (PPA)': {
    author: 'ondrej',
    ppa: 'php5-oldstable',
    package: 'php5',
    type: 'ppa',
  },
  'PHP5 (PPA)': {
    author: 'ondrej',
    ppa: 'php5',
    package: 'php5',
    type: 'ppa',
  },
  /*
  'Ubuntu Lucid (10.04 LTS) - apache2': {
    url: 'http://packages.ubuntu.com/lucid/apache2',
    regex: /Package: apache2 \(([^)]+)\)/g,
  },
  'Ubuntu Precise (12.04 LTS) - apache2': {
    url: 'http://packages.ubuntu.com/precise/apache2',
    regex: /Package: apache2 \(([^)]+)\)/g,
  },
  'Ubuntu Quantal (12.10) - apache2': {
    url: 'http://packages.ubuntu.com/quantal/apache2',
    regex: /Package: apache2 \(([^)]+)\)/g,
  },
  'Ubuntu Raring (13.04) - apache2': {
    url: 'http://packages.ubuntu.com/raring/apache2',
    regex: /Package: apache2 \(([^)]+)\)/g,
  },*/
  'Ubuntu Saucy (13.10) - apache2': {
    release: 'saucy',
    package: 'apache2',
    type: 'ubuntu_package',
  },
  'Node.js': {
    url: 'http://nodejs.org/',
    regex: /Current Version: v([^<]+)/g,
    type: 'regex',
  },
};

var keys = Object.keys(versionParser)
  , i
  , versionInfo = {};

for (i = 0; i < keys.length; i++) {
  var name = keys[i];
  getVersion(name, versionParser[name]);
}

function getVersion(name, details) {
  console.log('Checking ' + name);
  details.name = name;
  if (typeof parsers[details.type] === 'undefined') {
    parsers[details.type] = new (require('./parse/' + details.type))();
  }

  parsers[details.type].getVersion(details, checkForCompletion);
}

function checkForCompletion(name, versions) {
  versionInfo[name] = versions;
  if (Object.keys(versionInfo).length === Object.keys(versionParser).length) {
    console.log(versionInfo);
  }
}
<commit_msg>Adding remaining Apache2 for Ubuntu<commit_after>var request = require('request')
  , parsers = {};

var versionParser = {
  'PHP5 Old Stable (PPA)': {
    author: 'ondrej',
    ppa: 'php5-oldstable',
    package: 'php5',
    type: 'ppa',
  },
  'PHP5 (PPA)': {
    author: 'ondrej',
    ppa: 'php5',
    package: 'php5',
    type: 'ppa',
  },
  'Ubuntu Lucid (10.04 LTS) - apache2': {
    release: 'lucid',
    package: 'apache2',
    type: 'ubuntu_package',
  },
  'Ubuntu Precise (12.04 LTS) - apache2': {
    release: 'precise',
    package: 'apache2',
    type: 'ubuntu_package',
  },
  'Ubuntu Quantal (12.10) - apache2': {
    release: 'quantal',
    package: 'apache2',
    type: 'ubuntu_package',
  },
  'Ubuntu Raring (13.04) - apache2': {
    release: 'raring',
    package: 'apache2',
    type: 'ubuntu_package',
  },
  'Ubuntu Saucy (13.10) - apache2': {
    release: 'saucy',
    package: 'apache2',
    type: 'ubuntu_package',
  },
  'Node.js': {
    url: 'http://nodejs.org/',
    regex: /Current Version: v([^<]+)/g,
    type: 'regex',
  },
};

var keys = Object.keys(versionParser)
  , i
  , versionInfo = {};

for (i = 0; i < keys.length; i++) {
  var name = keys[i];
  getVersion(name, versionParser[name]);
}

function getVersion(name, details) {
  console.log('Checking ' + name);
  details.name = name;
  if (typeof parsers[details.type] === 'undefined') {
    parsers[details.type] = new (require('./parse/' + details.type))();
  }

  parsers[details.type].getVersion(details, checkForCompletion);
}

function checkForCompletion(name, versions) {
  versionInfo[name] = versions;
  if (Object.keys(versionInfo).length === Object.keys(versionParser).length) {
    console.log(versionInfo);
  }
}

{'fraction_non_alphanumeric': 0.2003985197836607, 'fraction_numerical': 0.022487902077996016, 'mean_word_length': 3.2542372881355934, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2662667', 'n_tokens_mistral': 1406, 'n_tokens_neox': 1291, 'n_words': 266}