<commit_before>package org.scalescc.maven

import org.apache.maven.plugins.annotations.{Component, Mojo, ResolutionScope}
import org.apache.maven.project.MavenProject
import org.apache.maven.plugin.descriptor.PluginDescriptor
import org.apache.maven.settings.Settings
import org.apache.maven.plugin.AbstractMojo
import java.io.File
import scales.{Env, IOUtils}
import org.scalescc.reporters.{ScalesHtmlWriter, CoberturaXmlWriter, ScalesXmlWriter}

/** @author <NAME> */
@Mojo(name = "report",
  threadSafe = false,
  requiresDependencyResolution = ResolutionScope.TEST,
  defaultPhase = org.apache.maven.plugins.annotations.LifecyclePhase.TEST)
class ReportMojo extends AbstractMojo {

  @Component
  var project: MavenProject = _

  @Component
  var plugin: PluginDescriptor = _

  @Component
  var settings: Settings = _

  def execute() {
    getLog.info("Creating report")

    val coverage = IOUtils.deserialize(Env.coverageFile)
    val measurements = IOUtils.invoked(Env.measurementFile)

    coverage.apply(measurements)

    val targetDirectory = new File("target")

    getLog.info("Writing ScalesXML report")
    ScalesXmlWriter.write(coverage, targetDirectory)

    getLog.info("Writing CoberturaXML report")
    CoberturaXmlWriter.write(coverage, targetDirectory)

    getLog.info("Writing Scales HTML report")
    ScalesHtmlWriter.write(coverage, targetDirectory)
  }
}
<commit_msg>Updated output dir to be subfolder<commit_after>package org.scalescc.maven

import org.apache.maven.plugins.annotations.{Component, Mojo, ResolutionScope}
import org.apache.maven.project.MavenProject
import org.apache.maven.plugin.descriptor.PluginDescriptor
import org.apache.maven.settings.Settings
import org.apache.maven.plugin.AbstractMojo
import java.io.File
import scales.{Env, IOUtils}
import org.scalescc.reporters.{ScalesHtmlWriter, CoberturaXmlWriter, ScalesXmlWriter}

/** @author <NAME> */
@Mojo(name = "report",
  threadSafe = false,
  requiresDependencyResolution = ResolutionScope.TEST,
  defaultPhase = org.apache.maven.plugins.annotations.LifecyclePhase.TEST)
class ReportMojo extends AbstractMojo {

  @Component
  var project: MavenProject = _

  @Component
  var plugin: PluginDescriptor = _

  @Component
  var settings: Settings = _

  def execute() {
    getLog.info("Creating report")

    val coverage = IOUtils.deserialize(Env.coverageFile)
    val measurements = IOUtils.invoked(Env.measurementFile)

    coverage.apply(measurements)

    val targetDirectory = new File("target/scales")
    targetDirectory.mkdirs()

    getLog.info("Writing ScalesXML report")
    ScalesXmlWriter.write(coverage, targetDirectory)

    getLog.info("Writing CoberturaXML report")
    CoberturaXmlWriter.write(coverage, targetDirectory)

    getLog.info("Writing Scales HTML report")
    ScalesHtmlWriter.write(coverage, targetDirectory)
  }
}

{'fraction_non_alphanumeric': 0.09687609687609687, 'fraction_numerical': 0.0, 'mean_word_length': 5.076759061833688, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '929508', 'n_tokens_mistral': 881, 'n_tokens_neox': 836, 'n_words': 166}