<commit_before>class AddParticipantIdToSocialNetworkingSharedItemsDataMigration < ActiveRecord::Migration
  def change
    SocialNetworking::SharedItem.where(participant_id: nil).each do |shared_item|
      shared_item.update(participant_id: shared_item.item.participant.id)
    end
  end
end
<commit_msg>[#84949534] Modified migration to remove population of participant_id on shared items if the associated item is nil.<commit_after>class AddParticipantIdToSocialNetworkingSharedItemsDataMigration < ActiveRecord::Migration
  def change
    SocialNetworking::SharedItem.where(participant_id: nil).each do |shared_item|
      if shared_item.item
        shared_item.update(participant_id: shared_item.item.participant.id)
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.06524633821571238, 'fraction_numerical': 0.010652463382157125, 'mean_word_length': 5.5964912280701755, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '381775', 'n_tokens_mistral': 227, 'n_tokens_neox': 214, 'n_words': 47}