<commit_before>require 'singleton'
require 'yaml'

module Nexty
  class Config
    include Singleton

    def initialize
      @default = {"config" => {"host"=>"127.0.0.1", "port"=>"3790", "user"=>"nxadmin", "pass"=>"<PASSWORD>"}}
    end

    def read(file)
      if file.nil? or !File.exists?(file)
        return @default
      end
      config = YAML.load_file(file)<commit_msg>Changed the default return value for read method<commit_after>require 'singleton'
require 'yaml'

module Nexty
  class Config
    include Singleton

    def read(file)
      if file.nil? or !File.exists?(file)
        return {"config" => {"host"=>"127.0.0.1", "port"=>"3790", "user"=>"nxadmin", "pass"=>"<PASSWORD>"}}
      end
      config = YAML.load_file(file)
{'fraction_non_alphanumeric': 0.1651006711409396, 'fraction_numerical': 0.026845637583892617, 'mean_word_length': 3.4142011834319526, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6771992', 'n_tokens_mistral': 267, 'n_tokens_neox': 254, 'n_words': 61}