<commit_before>class EnvironmentVariable
  def initialize(name, value, setatrun, mandatory, build_time_only,label, immutable)
    #name,value,ask,mandatory,build_time_only
    @name = name
    @value = value
    @ask_at_build_time = setatrun
    @build_time_only = build_time_only
    @mandatory = mandatory
    @label = label
    @immutable = immutable
    @has_changed = true
  end

  def setatrun
    return @ask_at_build_time
  end
  attr_reader :ask_at_build_time,
  :name,
  :build_time_only,
  :mandatory,
  :label,
  :immutable,
  :has_changed
  attr_accessor :value

  def attributes
    retval = {}
    retval[:name] = @name
    retval[:label] = @label
    retval[:value] = @value
    retval[:ask_at_build_time] = @ask_at_build_time
    retval[:build_time_only] = @build_time_only
    retval[:mandatory] = @mandatory
    retval[:immutable] = @immutable
    retval[:changed] = @has_changed
    return retval
  end

  # Replace any envs in dest [Array] that exist in fresh_envs [Array] and add any new
  # the members or teh arrays are EnvironmentVariable match by EnvironmentVariable.name
  def self.merge_envs(fresh_envs,dest)
    fresh_envs.each do |new_env|
      r = self.find_env_in(new_env,dest)
      dest.delete(r) unless r.nil?
    end
    dest.push(fresh_envs)
    return dest
  end

  def self.find_env_in(new_env,dest)
    dest.each do  |env|
      STDERR.puts '+++++++++++++++++++++++++++++'
      STDERR.puts env.to_s
      
      next unless env.is_a?(EnvironmentVariable)
      return env if env.name = new_env.name
    end
    return nil
  end
end<commit_msg>correct para<commit_after>class EnvironmentVariable
  def initialize(name, value, setatrun, mandatory, build_time_only,label, immutable)
    #name,value,ask,mandatory,build_time_only
    @name = name
    @value = value
    @ask_at_build_time = setatrun
    @build_time_only = build_time_only
    @mandatory = mandatory
    @label = label
    @immutable = immutable
    @has_changed = true
  end

  def setatrun
    return @ask_at_build_time
  end
  attr_reader :ask_at_build_time,
  :name,
  :build_time_only,
  :mandatory,
  :label,
  :immutable,
  :has_changed
  attr_accessor :value

  def attributes
    retval = {}
    retval[:name] = @name
    retval[:label] = @label
    retval[:value] = @value
    retval[:ask_at_build_time] = @ask_at_build_time
    retval[:build_time_only] = @build_time_only
    retval[:mandatory] = @mandatory
    retval[:immutable] = @immutable
    retval[:changed] = @has_changed
    return retval
  end

  # Replace any envs in dest [Array] that exist in fresh_envs [Array] and add any new
  # the members or teh arrays are EnvironmentVariable match by EnvironmentVariable.name
  def self.merge_envs(fresh_envs,dest)
    fresh_envs.each do |new_env|
      r = self.find_env_in(new_env,dest)
      dest.delete(r) unless r.nil?
    end
    dest.push(new_env)
    return dest
  end

  def self.find_env_in(new_env,dest)
    dest.each do  |env|
      STDERR.puts '+++++++++++++++++++++++++++++'
      STDERR.puts env.to_s
      STDERR.puts new_env.to_s
      STDERR.puts new_env.class.name
      next unless env.is_a?(EnvironmentVariable)
      return env if env.name = new_env.name
    end
    return nil
  end
end
{'fraction_non_alphanumeric': 0.10381158971180664, 'fraction_numerical': 0.0, 'mean_word_length': 3.4098360655737703, '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': '3865679', 'n_tokens_mistral': 1130, 'n_tokens_neox': 1118, 'n_words': 254}