<commit_before>package akka.persistence.jdbc.dao.bytea

import akka.persistence.PersistentRepr
import akka.persistence.jdbc.dao.bytea.ReadJournalTables.JournalRow
import akka.persistence.jdbc.serialization.FlowReadJournalSerializer
import akka.serialization.Serialization

import scala.compat.Platform
import scala.util.Try

object ByteArrayReadJournalSerializer {
  def encodeTags(tags: Set[String], separator: String): Option[String] =
    if (tags.isEmpty) None else Option(tags.mkString(separator))

  def decodeTags(tags: Option[String], separator: String): Set[String] =
    tags.map(_.split(separator).toSet).getOrElse(Set.empty[String])
}

class ByteArrayReadJournalSerializer(serialization: Serialization,
                                     separator: String) extends FlowReadJournalSerializer[JournalRow] {

  override def serialize(persistentRepr: PersistentRepr, tags: Set[String]): Try[JournalRow] = {
    serialization
    .serialize(persistentRepr)
    .map(JournalRow(persistentRepr.persistenceId,
                    persistentRepr.sequenceNr,
                    _,
                    Platform.currentTime,
                    ByteArrayJournalSerializer.encodeTags(tags, separator)))
  }

  override def deserialize(journalRow: JournalRow): Try[(PersistentRepr, Set[String])] = {
    serialization.deserialize(journalRow.message, classOf[PersistentRepr])
    .map((_, ByteArrayJournalSerializer.decodeTags(journalRow.tags, separator)))
  }
}<commit_msg>Fixes bug due to copy pasting<commit_after>package akka.persistence.jdbc.dao.bytea

import akka.persistence.PersistentRepr
import akka.persistence.jdbc.dao.bytea.ReadJournalTables.JournalRow
import akka.persistence.jdbc.serialization.FlowReadJournalSerializer
import akka.serialization.Serialization

import scala.compat.Platform
import scala.util.Try

object ByteArrayReadJournalSerializer {
  def encodeTags(tags: Set[String], separator: String): Option[String] =
    if (tags.isEmpty) None else Option(tags.mkString(separator))

  def decodeTags(tags: Option[String], separator: String): Set[String] =
    tags.map(_.split(separator).toSet).getOrElse(Set.empty[String])
}

class ByteArrayReadJournalSerializer(serialization: Serialization,
                                     separator: String) extends FlowReadJournalSerializer[JournalRow] {

  override def serialize(persistentRepr: PersistentRepr, tags: Set[String]): Try[JournalRow] = {
    serialization
    .serialize(persistentRepr)
    .map(JournalRow(persistentRepr.persistenceId,
                    persistentRepr.sequenceNr,
                    _,
                    Platform.currentTime,
                    ByteArrayReadJournalSerializer.encodeTags(tags, separator)))
  }

  override def deserialize(journalRow: JournalRow): Try[(PersistentRepr, Set[String])] = {
    serialization.deserialize(journalRow.message, classOf[PersistentRepr])
    .map((_, ByteArrayReadJournalSerializer.decodeTags(journalRow.tags, separator)))
  }
}
{'fraction_non_alphanumeric': 0.09623149394347241, 'fraction_numerical': 0.0, 'mean_word_length': 4.21578947368421, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6003697', 'n_tokens_mistral': 834, 'n_tokens_neox': 812, 'n_words': 137}