<commit_before>module VagrantPlugins
  module Dotvm
    module Injector
      class Machine < AbstractInjector
        BOX_OPTIONS = [
          :box,
          :hostname,
          :boot_timeout,
          :box_check_update,
          :box_version,
          :graceful_halt_timeout,
          :post_up_message,
          :box_download_checksum,
          :box_download_checksum_type,
          :box_download_client_cert,
          :box_download_ca_cert,
          :box_download_ca_path,
          :box_download_insecure,
          :box_download_location_trusted,
          :box_url,
          :communicator,
          :guest,
          :usable_port_range,
        ]

        def self.inject(machine_cfg: nil, vc: nil)
          define_opts = {}
          define_opts[:primary]   = machine_cfg.primary   unless machine_cfg.primary.nil?
          define_opts[:autostart] = machine_cfg.autostart unless machine_cfg.autostart.nil?

          vc.vm.define machine_cfg.nick, **define_opts do |machine|
            BOX_OPTIONS.each do |opt|
              val = machine_cfg.send(opt)
              machine.vm.send("#{opt}=", val) unless val.nil?
            end

            machine.vm.provider 'virtualbox' do |vb|
              vb.customize ['modifyvm', :id, '--memory',          machine_cfg.memory] unless machine_cfg.memory.nil?
              vb.customize ['modifyvm', :id, '--cpus',            machine_cfg.cpus]   unless machine_cfg.cpus.nil?
              vb.customize ['modifyvm', :id, '--cpuexecutioncap', machine_cfg.cpucap] unless machine_cfg.cpucap.nil?
              vb.customize ['modifyvm', :id, '--natnet1',         machine_cfg.natnet] unless machine_cfg.natnet.nil?

              machine_cfg.options.to_h[:virtualbox].to_a.each do |option|
                vb.customize ['modifyvm', :id, option.name, option.value]
              end
            end

            machine.vm.provider 'vmware_fusion' do |vf|
              vf.vmx['memsize']  = machine_cfg.memory unless machine_cfg.memory.nil?
              vf.vmz['numvcpus'] = machine_cfg.cpus   unless machine_cfg.cpus.nil?
            end

            machine_cfg.networks.to_a.each do |net|
              Network.inject net: net,
                             machine: machine
            end
<commit_msg>fix typo impacting VMX virtualization<commit_after>module VagrantPlugins
  module Dotvm
    module Injector
      class Machine < AbstractInjector
        BOX_OPTIONS = [
          :box,
          :hostname,
          :boot_timeout,
          :box_check_update,
          :box_version,
          :graceful_halt_timeout,
          :post_up_message,
          :box_download_checksum,
          :box_download_checksum_type,
          :box_download_client_cert,
          :box_download_ca_cert,
          :box_download_ca_path,
          :box_download_insecure,
          :box_download_location_trusted,
          :box_url,
          :communicator,
          :guest,
          :usable_port_range,
        ]

        def self.inject(machine_cfg: nil, vc: nil)
          define_opts = {}
          define_opts[:primary]   = machine_cfg.primary   unless machine_cfg.primary.nil?
          define_opts[:autostart] = machine_cfg.autostart unless machine_cfg.autostart.nil?

          vc.vm.define machine_cfg.nick, **define_opts do |machine|
            BOX_OPTIONS.each do |opt|
              val = machine_cfg.send(opt)
              machine.vm.send("#{opt}=", val) unless val.nil?
            end

            machine.vm.provider 'virtualbox' do |vb|
              vb.customize ['modifyvm', :id, '--memory',          machine_cfg.memory] unless machine_cfg.memory.nil?
              vb.customize ['modifyvm', :id, '--cpus',            machine_cfg.cpus]   unless machine_cfg.cpus.nil?
              vb.customize ['modifyvm', :id, '--cpuexecutioncap', machine_cfg.cpucap] unless machine_cfg.cpucap.nil?
              vb.customize ['modifyvm', :id, '--natnet1',         machine_cfg.natnet] unless machine_cfg.natnet.nil?

              machine_cfg.options.to_h[:virtualbox].to_a.each do |option|
                vb.customize ['modifyvm', :id, option.name, option.value]
              end
            end

            machine.vm.provider 'vmware_fusion' do |vf|
              vf.vmx['memsize']  = machine_cfg.memory unless machine_cfg.memory.nil?
              vf.vmx['numvcpus'] = machine_cfg.cpus   unless machine_cfg.cpus.nil?
            end

            machine_cfg.networks.to_a.each do |net|
              Network.inject net: net,
                             machine: machine
            end

{'fraction_non_alphanumeric': 0.09881422924901186, 'fraction_numerical': 0.0004391743522178305, 'mean_word_length': 1.8810879190385832, 'pattern_counts': {'":': 0, '<': 5, '<?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': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5612942', 'n_tokens_mistral': 1411, 'n_tokens_neox': 1375, 'n_words': 246}