<commit_before>module MB
  class MessageFlag < ActiveRecord::Base
    set_table_name       :mbmessageflag
    set_primary_key      :messageflagid

    # com.liferay.portlet.messageboards.model.MBMessageFlag
    def liferay_class
      'com.liferay.portlet.messageboards.model.MBMessageFlag'
    end

    belongs_to :user,
      :foreign_key => 'userid'

    belongs_to :message,
      :class_name => 'MB::Message',
      :foreign_key => 'messageid'

  end
end<commit_msg>creation of message flag requires message<commit_after>module MB
  class MessageFlag < ActiveRecord::Base
    set_table_name       :mbmessageflag
    set_primary_key      :messageflagid

    # com.liferay.portlet.messageboards.model.MBMessageFlag
    def liferay_class
      'com.liferay.portlet.messageboards.model.MBMessageFlag'
    end

    belongs_to :user,
      :foreign_key => 'userid'

    belongs_to :message,
      :class_name => 'MB::Message',
      :foreign_key => 'messageid'

    def initialize(params)
      raise 'No messageid' unless params[:message] or params[:messageid]
      super(params)
    end

  end
end
{'fraction_non_alphanumeric': 0.08917197452229299, 'fraction_numerical': 0.0, 'mean_word_length': 3.230769230769231, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5863449', 'n_tokens_mistral': 349, 'n_tokens_neox': 346, 'n_words': 67}