<commit_before>package dotty.tools
package dotc
package ast

import util.Spans._
import util.{SourceFile, NoSource, SourcePosition}
import core.Contexts.Context
import core.Decorators._
import core.Flags.{JavaDefined, Extension}
import core.StdNames.nme
import annotation.constructorOnly
import annotation.internal.sharable
import reporting.Reporter

import java.io.{ PrintWriter }

/** A base class for things that have positions (currently: modifiers and trees)
 */
abstract class Positioned(implicit @constructorOnly src: SourceFile) extends Product with Cloneable {

  private[this] var myUniqueId: Int = _
  private[this] var mySpan: Span = _

  /** A unique identifier. Among other things, used for determining the source file
   *  component of the position.
   */
  def uniqueId: Int = myUniqueId

  def uniqueId_=(id: Int): Unit = {
    if (Positioned.debugId == id) {
      println(s"Debug tree (id=${Positioned.debugId}) creation \n$this\n")
      Reporter.displayPrompt(Console.in, new PrintWriter(Console.err, true))
    }
    myUniqueId = id
  }

  /** The span part of the item's position */
  def span: Span = mySpan

  def span_=(span: Span): Unit = {<commit_msg>Address review<commit_after>package dotty.tools
package dotc
package ast

import util.Spans._
import util.{SourceFile, NoSource, SourcePosition}
import core.Contexts.Context
import core.Decorators._
import core.Flags.{JavaDefined, Extension}
import core.StdNames.nme
import annotation.constructorOnly
import annotation.internal.sharable
import reporting.Reporter

import java.io.{ PrintWriter }

/** A base class for things that have positions (currently: modifiers and trees)
 */
abstract class Positioned(implicit @constructorOnly src: SourceFile) extends Product with Cloneable {

  private[this] var myUniqueId: Int = _
  private[this] var mySpan: Span = _

  /** A unique identifier. Among other things, used for determining the source file
   *  component of the position.
   */
  def uniqueId: Int = myUniqueId

  def uniqueId_=(id: Int): Unit = {
    def printTrace() = {
      println(s"Debug tree (id=${Positioned.debugId}) creation \n$this\n")
      Reporter.displayPrompt(Console.in, new PrintWriter(Console.err, true))
    }
    if (Positioned.debugId == id) printTrace()
    myUniqueId = id
  }

  /** The span part of the item's position */
  def span: Span = mySpan

  def span_=(span: Span): Unit = {
{'fraction_non_alphanumeric': 0.09887359198998748, 'fraction_numerical': 0.0, 'mean_word_length': 4.168103448275862, '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': '1784253', 'n_tokens_mistral': 722, 'n_tokens_neox': 707, 'n_words': 230}