<commit_before> var json = require('json-file'),
   Doc = require('../models/document'),
   User = require('../models/user'),
   Role = require('../models/roles');

 module.exports = {
   user: function() {
     var users;

     // Read users
     users = json.read('./data/users.json');

     // Insert users into the db
     User.collection.insert(users.data, function(err, users) {
       if (err) {
         console.log('======================================');
         console.log(err.message.substring(7, 26).toUpperCase() + ': Users Already created');
       } else {
         console.log('======================================');
         console.log('Users Have been inserted');
       }
     });
   },

   roles: function() {
     var roles;

     // Read roles
     roles = json.read('./data/roles.json');
     // Insert role into the db
     Role.collection.insert(roles.data, function(err, roles) {
       if (err) {
         console.log('======================================');
         console.log(err.message.substring(7, 26).toUpperCase() + ': Roles Already created');
       } else {
         console.log('======================================');
         console.log('Roles have been inserted');
       }
     });
   },

   documents: function() {
     var documents;

     // Read documents
     documents = json.read('./data/documents.json');
     // Insert documents into the db
     for(var key in documents.data) {
      var doc = documents.data[key];
      Doc.create({
        ownerId: doc.ownerId,
        title: doc.title,
        content: doc.content,
        access: doc.access,
        dateCreated: doc.dateCreated
      },
      function(err, documents) {
       if (err) {
         console.log('======================================');
         console.log(err.message.substring(7, 26).toUpperCase() + ': Users Already created');
       } else {
         console.log('======================================');
         console.log('Documents have been inserted');
       }
     });

     }

   }
 };
<commit_msg>seeding the database<commit_after> var json = require('json-file'),
   Doc = require('../models/document'),
   User = require('../models/user'),
   Role = require('../models/roles');

 module.exports = {
   user: function() {
     var users;

     // Read users
     users = json.read('./data/users.json');

     // Insert users into the db
     User.collection.insert(users.data, function(err, users) {
       if (err) {
         console.log('======================================');
         console.log(err.message.substring(7, 26).toUpperCase() + ': Users Already created');
       } else {
         console.log('======================================');
         console.log('Users Have been inserted');
       }
     });
   },

   roles: function() {
     var roles;

     // Read roles
     roles = json.read('./data/roles.json');
     // Insert role into the db
     Role.collection.insert(roles.data, function(err, roles) {
       if (err) {
         console.log('======================================');
         console.log(err.message.substring(7, 26).toUpperCase() + ': Roles Already created');
       } else {
         console.log('======================================');
         console.log('Roles have been inserted');
       }
     });
   },

   documents: function() {
     var documents;

     // Read documents
     documents = json.read('./data/documents.json');
     // Insert documents into the db
     documents.data.forEach(function(doc) {
       Doc.create({
        ownerId: doc.ownerId,
        title: doc.title,
        content: doc.content,
        access: doc.access,
        dateCreated: doc.dateCreated
      },
      function(err, documents) {
       if (err) {
         console.log('======================================');
         console.log(err.message.substring(7, 26).toUpperCase() + ': Users Already created');
       } else {
         console.log('======================================');
         console.log('Documents have been inserted');
       }
     });
     });
   }
 };
{'fraction_non_alphanumeric': 0.2536764705882353, 'fraction_numerical': 0.004411764705882353, 'mean_word_length': 2.367161716171617, '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': '6560133', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1064, 'n_words': 232}