<commit_before>var express = require('express');

var helper = require('../helper.js');
var gadgets = helper.db.collection('gadgets');
var count = helper.db.collection('count');

var router = express.Router();

router.get('/', function(req, res) {

  count.find({}).toArray(function(_err,_result){
    console.log(_result);
    console.log('a');
    if(_result&&_result.length > 0) {
      console.log('b');
      _result[0].count= _result[0].count+1;
      count.save(_result[0],function(_err,_result2){
        console.log(_result2);
      })
    } else {
      console.log('c');
      count.insert({ count : 0},function(_err,_result3){
        console.log(_result3);
      });
    }
  });
  gadgets.find({}).toArray(function(_err,_result){
    if(_result) {
      res.render('index', { title: 'Express'+_result.length });  
    } else {<commit_msg>ein weiterer Test<commit_after>var express = require('express');

var helper = require('../helper.js');
var gadgets = helper.db.collection('gadgets');
var count = helper.db.collection('count');

var router = express.Router();

router.get('/', function(req, res) {

  count.find({}).toArray(function(_err,_result){
    console.log(_result);
    console.log('a');
    if(_result&&_result.length > 0) {
      console.log('b');
      _result[0].count= _result[0].count+1;
      count.save(_result[0],function(_err,_result2){
        console.log(_result2);
      })
    } else {
      console.log('c');
      count.insert({ count : 0},function(_err,_result3){
        console.log(_result3);
      });
    }
  });
  gadgets.find({}).toArray(function(_err,_result){
    if(_result&&_result!=undefined&&_result.length) {
      res.render('index', { title: 'Express'+_result.length });  
    } else {
{'fraction_non_alphanumeric': 0.195752009184845, 'fraction_numerical': 0.011481056257175661, 'mean_word_length': 3.5155440414507773, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6109674', 'n_tokens_mistral': 575, 'n_tokens_neox': 567, 'n_words': 82}