<commit_before>module Domgen
  module Generator
    module Imit
      TEMPLATE_DIRECTORY = "#{File.dirname(__FILE__)}/templates"
      HELPERS = [Domgen::Java::Helper]
      FACETS = [:imit]
    end

    def self.define_imit_templates
      [
        Template.new(Imit::FACETS,
                     :enumeration,
                     "#{Imit::TEMPLATE_DIRECTORY}/enum.erb",
                     'java/#{enumeration.imit.qualified_enumeration_name.gsub(".","/")}.java',
                     Imit::HELPERS,
                     'enumeration.data_module.imit.client_side?'),
        Template.new(Imit::FACETS,
                     :data_module,
                     "#{Imit::TEMPLATE_DIRECTORY}/updater.erb",
                     'java/#{data_module.imit.qualified_updater_name.gsub(".","/")}.java',
                     Imit::HELPERS,
                     'data_module.imit.client_side?'),
        Template.new(Imit::FACETS,
                     :entity,
                     "#{Imit::TEMPLATE_DIRECTORY}/imitation.erb",
                     'java/#{entity.imit.qualified_imitation_name.gsub(".","/")}.java',
                     Imit::HELPERS,
                     'entity.imit.client_side?'),
        Template.new(Imit::FACETS,
                     :data_module,
                     "#{Imit::TEMPLATE_DIRECTORY}/mapper.erb",
                     'java/#{data_module.imit.qualified_mapper_name.gsub(".","/")}.java',
                     Imit::HELPERS,
                     'data_module.imit.client_side?'),
      ]
    end

    def self.define_imit_json_templates
      [
        Template.new(Imit::FACETS,
                     :repository,
                     "#{Imit::TEMPLATE_DIRECTORY}/repository_json_mapper.erb",
                     'java/#{repository.imit.qualified_json_mapper_name.gsub(".","/")}.java',
                     Imit::HELPERS),
      ]
    end

    def self.define_imit_rpc_templates
      [
        Template.new(Imit::FACETS,
                     :repository,
                     "#{Imit::TEMPLATE_DIRECTORY}/repository_rpc_mapper.erb",
                     'java/#{repository.imit.qualified_rpc_mapper_name.gsub(".","/")}.java',
                     Imit::HELPERS),
      ]
    end

    def self.define_imit_rpc_jpa_templates
      facets = Imit::FACETS + [:jpa]
      helpers = Imit::HELPERS + [Domgen::JPA::Helper, Domgen::Java::Helper]
      [
        Template.new(facets,
                     :data_module,
                     "#{Imit::TEMPLATE_DIRECTORY}/jpa_encoder.erb",
                     'java/#{data_module.imit.qualified_jpa_encoder_name.gsub(".","/")}.java',
                     helpers,
                     'data_module.imit.client_side?'),
        Template.new(facets,
                     :data_module,
                     "#{Imit::TEMPLATE_DIRECTORY}/router_interface.erb",
                     'java/#{data_module.imit.qualified_router_interface_name.gsub(".","/")}.java',
                     helpers,
                     'data_module.imit.client_side?'),
        Template.new(facets,
                     :repository,
                     "#{Imit::TEMPLATE_DIRECTORY}/jpa_change_recorder.erb",<commit_msg>Rename the jpa generator<commit_after>module Domgen
  module Generator
    module Imit
      TEMPLATE_DIRECTORY = "#{File.dirname(__FILE__)}/templates"
      HELPERS = [Domgen::Java::Helper]
      FACETS = [:imit]
    end

    def self.define_imit_templates
      [
        Template.new(Imit::FACETS,
                     :enumeration,
                     "#{Imit::TEMPLATE_DIRECTORY}/enum.erb",
                     'java/#{enumeration.imit.qualified_enumeration_name.gsub(".","/")}.java',
                     Imit::HELPERS,
                     'enumeration.data_module.imit.client_side?'),
        Template.new(Imit::FACETS,
                     :data_module,
                     "#{Imit::TEMPLATE_DIRECTORY}/updater.erb",
                     'java/#{data_module.imit.qualified_updater_name.gsub(".","/")}.java',
                     Imit::HELPERS,
                     'data_module.imit.client_side?'),
        Template.new(Imit::FACETS,
                     :entity,
                     "#{Imit::TEMPLATE_DIRECTORY}/imitation.erb",
                     'java/#{entity.imit.qualified_imitation_name.gsub(".","/")}.java',
                     Imit::HELPERS,
                     'entity.imit.client_side?'),
        Template.new(Imit::FACETS,
                     :data_module,
                     "#{Imit::TEMPLATE_DIRECTORY}/mapper.erb",
                     'java/#{data_module.imit.qualified_mapper_name.gsub(".","/")}.java',
                     Imit::HELPERS,
                     'data_module.imit.client_side?'),
      ]
    end

    def self.define_imit_json_templates
      [
        Template.new(Imit::FACETS,
                     :repository,
                     "#{Imit::TEMPLATE_DIRECTORY}/repository_json_mapper.erb",
                     'java/#{repository.imit.qualified_json_mapper_name.gsub(".","/")}.java',
                     Imit::HELPERS),
      ]
    end

    def self.define_imit_rpc_templates
      [
        Template.new(Imit::FACETS,
                     :repository,
                     "#{Imit::TEMPLATE_DIRECTORY}/repository_rpc_mapper.erb",
                     'java/#{repository.imit.qualified_rpc_mapper_name.gsub(".","/")}.java',
                     Imit::HELPERS),
      ]
    end

    def self.define_imit_jpa_templates
      facets = Imit::FACETS + [:jpa]
      helpers = Imit::HELPERS + [Domgen::JPA::Helper, Domgen::Java::Helper]
      [
        Template.new(facets,
                     :data_module,
                     "#{Imit::TEMPLATE_DIRECTORY}/jpa_encoder.erb",
                     'java/#{data_module.imit.qualified_jpa_encoder_name.gsub(".","/")}.java',
                     helpers,
                     'data_module.imit.client_side?'),
        Template.new(facets,
                     :data_module,
                     "#{Imit::TEMPLATE_DIRECTORY}/router_interface.erb",
                     'java/#{data_module.imit.qualified_router_interface_name.gsub(".","/")}.java',
                     helpers,
                     'data_module.imit.client_side?'),
        Template.new(facets,
                     :repository,
                     "#{Imit::TEMPLATE_DIRECTORY}/jpa_change_recorder.erb",
{'fraction_non_alphanumeric': 0.13573801613668723, 'fraction_numerical': 0.0, 'mean_word_length': 1.5846279640228946, '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': '7433187', 'n_tokens_mistral': 1990, 'n_tokens_neox': 1865, 'n_words': 162}