<commit_before>var service = require('./lib/service'),
    async = require('async'),
    joi = require("joi"),
    schema = require("./lib/schema"),
    _ = require('underscore');

var config = {};

var validateOptions = function(options){
  var result = joi.validate(options, schema);
  if(result.error){
    throw result.error;
  }

  return result.value;
};

var statusCode = function(status){
  if(status == 'Failed'){
    return config.failureStatusCode;
  }
  return 200;
}

exports.register = function(plugin, options, next){
    plugin.log(["service-status"], "validating monitors");
    config = validateOptions(options);

    plugin.log(["service-status"], "registering service-status routes");<commit_msg>Fixed condition<commit_after>var service = require('./lib/service'),
    async = require('async'),
    joi = require("joi"),
    schema = require("./lib/schema"),
    _ = require('underscore');

var config = {};

var validateOptions = function(options){
  var result = joi.validate(options, schema);
  if(result.error){
    throw result.error;
  }

  return result.value;
};

var statusCode = function(status){
  if(status === 'Failed'){
    return config.failureStatusCode;
  }
  return 200;
}

exports.register = function(plugin, options, next){
    plugin.log(["service-status"], "validating monitors");
    config = validateOptions(options);

    plugin.log(["service-status"], "registering service-status routes");
{'fraction_non_alphanumeric': 0.16236933797909409, 'fraction_numerical': 0.004181184668989547, 'mean_word_length': 4.240875912408759, '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': '269555', 'n_tokens_mistral': 432, 'n_tokens_neox': 419, 'n_words': 92}