<commit_before>class App.Config
  _instance = undefined

  @init: ->
    _instance ?= new _configSingleton

  @get: ( key, group ) ->
    if _instance == undefined
      _instance ?= new _configSingleton
    _instance.get( key, group )

  @set: ( key, value, group ) ->
    if _instance == undefined
      _instance ?= new _configSingleton
    _instance.set( key, value, group )

  @_all: ->
    if _instance == undefined
      _instance ?= new _configSingleton
    _instance._all()

class _configSingleton
  constructor: ->
    @config = {}

  get: ( key, group ) ->
    if group
      return undefined if !group of @config
      return undefined if @config[group] is undefined
      return @config[group][key]
    return @config[key]

  set: ( key, value, group ) ->
    if group
      if !@config[group]
        @config[group] = {}
      @config[group][key] = value
    else
      @config[key] = value

  _all: ->
    @config<commit_msg>Code cleanup.<commit_after>class App.Config
  _instance = undefined

  @init: ->
    _instance ?= new _configSingleton

  @get: (key, group) ->
    if _instance == undefined
      _instance ?= new _configSingleton
    _instance.get(key, group)

  @set: (key, value, group) ->
    if _instance == undefined
      _instance ?= new _configSingleton
    _instance.set(key, value, group)

  @all: ->
    if _instance == undefined
      _instance ?= new _configSingleton
    _instance.all()

class _configSingleton
  constructor: ->
    @config = {}

  get: (key, group) ->
    if group
      return undefined if !group of @config
      return undefined if @config[group] is undefined
      return @config[group][key]
    return @config[key]

  set: (key, value, group) ->
    if group
      if !@config[group]
        @config[group] = {}
      @config[group][key] = value
    else
      @config[key] = value

  all: ->
    @config
{'fraction_non_alphanumeric': 0.1195710455764075, 'fraction_numerical': 0.0, 'mean_word_length': 2.5678776290630974, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '3627495', 'n_tokens_mistral': 594, 'n_tokens_neox': 579, 'n_words': 164}