<commit_before>package com.squareup.wire

import okio.BufferedSink
import okio.ByteString

/** A protocol buffer message. */
actual abstract class Message<M : Message<M, B>, B : Message.Builder<M, B>> protected constructor(
  private val adapter: ProtoAdapter<M>,
  /** Unknown fields, proto-encoded. We permit null to support magic deserialization. */
  private val unknownFields: ByteString?
) {
  /** If non-zero, the hash code of this message. Accessed by generated code. */
  protected actual var hashCode = 0

  init {
    if (unknownFields == null) throw NullPointerException("unknownFields == null")
  }

  /**
   * Returns a byte string containing the proto encoding of this message's unknown fields. Returns
   * an empty byte string if this message has no unknown fields.
   */
  actual fun unknownFields(): ByteString = unknownFields ?: ByteString.EMPTY

  /**
   * Returns a new builder initialized with the data in this message.
   */
  actual abstract fun newBuilder(): B

  /** Returns this message with any unknown fields removed. */
  actual fun withoutUnknownFields(): M = TODO()

  /** The [ProtoAdapter] for encoding and decoding messages of this type. */
  actual fun adapter(): ProtoAdapter<M> = adapter

  /** Encode this message and write it to `stream`. */
  actual fun encode(sink: BufferedSink) {
    adapter.encode(sink, this as M)
  }
<commit_msg>Add JsName to Message#hashCode to avoid name clash on JS<commit_after>package com.squareup.wire

import okio.BufferedSink
import okio.ByteString

/** A protocol buffer message. */
actual abstract class Message<M : Message<M, B>, B : Message.Builder<M, B>> protected constructor(
  private val adapter: ProtoAdapter<M>,
  /** Unknown fields, proto-encoded. We permit null to support magic deserialization. */
  private val unknownFields: ByteString?
) {
  /** If non-zero, the hash code of this message. Accessed by generated code. */
  @JsName("cachedHashCode") protected actual var hashCode = 0

  init {
    if (unknownFields == null) throw NullPointerException("unknownFields == null")
  }

  /**
   * Returns a byte string containing the proto encoding of this message's unknown fields. Returns
   * an empty byte string if this message has no unknown fields.
   */
  actual fun unknownFields(): ByteString = unknownFields ?: ByteString.EMPTY

  /**
   * Returns a new builder initialized with the data in this message.
   */
  actual abstract fun newBuilder(): B

  /** Returns this message with any unknown fields removed. */
  actual fun withoutUnknownFields(): M = TODO()

  /** The [ProtoAdapter] for encoding and decoding messages of this type. */
  actual fun adapter(): ProtoAdapter<M> = adapter

  /** Encode this message and write it to `stream`. */
  actual fun encode(sink: BufferedSink) {
    adapter.encode(sink, this as M)
  }

{'fraction_non_alphanumeric': 0.09776833156216791, 'fraction_numerical': 0.0007084661707403471, 'mean_word_length': 3.7622259696458684, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3137773', 'n_tokens_mistral': 766, 'n_tokens_neox': 750, 'n_words': 318}