<commit_before>'use strict';

var exec = require('child_process').exec;
var fs = require('fs');
var path = require('path');
var _ = require('lodash');
var rimraf = require('rimraf');
var plugin = require('../../lib/plugin.js');

module.exports = function() {
  plugin.init(function(manager, app, docker) {

    manager.registerTask('info', function(done) {
      console.log('app: ' + app.name);
      done();
    });

    manager.registerTask('init', function(done) {
      manager.init(app, done);
    });

    manager.registerTask('start', function(done) {
      manager.start(app, done);
    });

    manager.registerTask('stop', function(done) {
      manager.stop(app, done);
    });

    manager.registerTask('restart', function(done) {
      manager.stop(app, function(err) {
        if (err) {
          done(err);
        } else {
          manager.start(app, done);
        }
      });
    });

    manager.registerTask('kill', function(done) {
      manager.kill(app, done);
    });

    manager.registerTask('remove', function(done) {
      manager.remove(app, done);
    });

    manager.registerTask('pull', function(done) {
      manager.pull(app, done);
    });

    manager.registerTask('build', function(done) {
      manager.build(app, done);
    });

    app.on('post-init', function(done) {
      var a = _.cloneDeep(app);
      delete a.components;
      fs.writeFileSync(path.resolve(app.dataPath, 'app.json'), JSON.stringify(a));
      done();
    });

  });
};
<commit_msg>BUG: done is not a function<commit_after>'use strict';

var exec = require('child_process').exec;
var fs = require('fs');
var path = require('path');
var _ = require('lodash');
var rimraf = require('rimraf');
var plugin = require('../../lib/plugin.js');

module.exports = function() {
  plugin.init(function(manager, app, docker) {

    manager.registerTask('info', function(done) {
      console.log('app: ' + app.name);
      done();
    });

    manager.registerTask('init', function(done) {
      manager.init(app, done);
    });

    manager.registerTask('start', function(done) {
      manager.start(app, done);
    });

    manager.registerTask('stop', function(done) {
      manager.stop(app, done);
    });

    manager.registerTask('restart', function(done) {
      manager.stop(app, function(err) {
        if (err) {
          done(err);
        } else {
          manager.start(app, done);
        }
      });
    });

    manager.registerTask('kill', function(done) {
      manager.kill(app, done);
    });

    manager.registerTask('remove', function(done) {
      manager.remove(app, done);
    });

    manager.registerTask('pull', function(done) {
      manager.pull(app, done);
    });

    manager.registerTask('build', function(done) {
      manager.build(app, done);
    });

    app.on('post-init', function() {
      var a = _.cloneDeep(app);
      delete a.components;
      fs.writeFileSync(path.resolve(app.dataPath, 'app.json'), JSON.stringify(a));
    });

  });
};

{'fraction_non_alphanumeric': 0.18303273213092852, 'fraction_numerical': 0.0, 'mean_word_length': 2.844672657252888, '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': '638412', 'n_tokens_mistral': 945, 'n_tokens_neox': 918, 'n_words': 160}