<commit_before>var _ = require("lodash")
var path = require("path")

// Load configuration file
function loadFile(dir, filename) {
  if (filename == null) return {}
  filename = path.join(dir, filename)
  try {
    return require(filename)
  } catch(e) {
    return {}
  }
}

module.exports = Config
function Config(options) {
  this.options = options
  this._config = null
}

Config.prototype.getConfig = function () {
  if (!this._config) {
    this._config = _.extend({},
      loadFile(this.options.dir, "default"),<commit_msg>Use merge instead of extend when merging configurations.<commit_after>var _ = require("lodash")
var path = require("path")

// Load configuration file
function loadFile(dir, filename) {
  if (filename == null) return {}
  filename = path.join(dir, filename)
  try {
    return require(filename)
  } catch(e) {
    return {}
  }
}

module.exports = Config
function Config(options) {
  this.options = options
  this._config = null
}

Config.prototype.getConfig = function () {
  if (!this._config) {
    this._config = _.merge({},
      loadFile(this.options.dir, "default"),
{'fraction_non_alphanumeric': 0.1403985507246377, 'fraction_numerical': 0.0, 'mean_word_length': 3.742489270386266, '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': '5354880', 'n_tokens_mistral': 341, 'n_tokens_neox': 337, 'n_words': 84}