<commit_before>package fr.inria.spirals.sigma.ttc14.fixml

import java.io.File
import scala.util.Failure
import scala.util.Success
import com.typesafe.scalalogging.log4j.Logging
import fr.unice.i3s.sigma.util.IOUtils
import fr.unice.i3s.sigma.support.ScalaSigmaSupport
import fr.inria.spirals.sigma.ttc14.fixml.objlang.Class
import fr.inria.spirals.sigma.ttc14.fixml.objlang.support.ObjLang
import fr.unice.i3s.sigma.m2t.M2TF

object Main extends App with Logging with ScalaSigmaSupport with ObjLang {

  // currently implemented drivers
  val drivers = Seq(
    ("java", new XMLMM2Java, M2TF(
      (new ObjLang2Java, { s: Class ⇒ s"${s.name}.java" })
    )),
    ("cs", new XMLMM2CSharp, M2TF(
      (new ObjLang2CSharp, { s: Class ⇒ s"${s.name}.cs" })
    )),
    ("cpp", new XMLMM2CPP, M2TF(
      (new ObjLang2CPPWithInitializerList, { s: Class ⇒ s"${s.name}.cpp" }),
      (new ObjLang2HPP, { s: Class ⇒ s"${s.name}.h" })
    ))
  )

  def execute(src: File, dest: File) {

    if (dest.isDirectory) {
      logger info s"Cleaning directory ${dest}"
      IOUtils.rmdir(dest, false, true)<commit_msg>Use the cpp non-initializer lists by default<commit_after>package fr.inria.spirals.sigma.ttc14.fixml

import java.io.File
import scala.util.Failure
import scala.util.Success
import com.typesafe.scalalogging.log4j.Logging
import fr.unice.i3s.sigma.util.IOUtils
import fr.unice.i3s.sigma.support.ScalaSigmaSupport
import fr.inria.spirals.sigma.ttc14.fixml.objlang.Class
import fr.inria.spirals.sigma.ttc14.fixml.objlang.support.ObjLang
import fr.unice.i3s.sigma.m2t.M2TF

object Main extends App with Logging with ScalaSigmaSupport with ObjLang {

  // currently implemented drivers
  val drivers = Seq(
    ("java", new XMLMM2Java, M2TF(
      (new ObjLang2Java, { s: Class ⇒ s"${s.name}.java" })
    )),
    ("cs", new XMLMM2CSharp, M2TF(
      (new ObjLang2CSharp, { s: Class ⇒ s"${s.name}.cs" })
    )),
    ("cpp", new XMLMM2CPP, M2TF(
      (new ObjLang2CPP, { s: Class ⇒ s"${s.name}.cpp" }),
      (new ObjLang2HPP, { s: Class ⇒ s"${s.name}.h" })
    ))
  )

  def execute(src: File, dest: File) {

    if (dest.isDirectory) {
      logger info s"Cleaning directory ${dest}"
      IOUtils.rmdir(dest, false, true)
{'fraction_non_alphanumeric': 0.14163669064748202, 'fraction_numerical': 0.019784172661870502, 'mean_word_length': 3.616182572614108, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '6276175', 'n_tokens_mistral': 875, 'n_tokens_neox': 867, 'n_words': 179}