<commit_before>
module Cigale::SCM
  require "cigale/scm/git"
  require "cigale/scm/repo"
  require "cigale/scm/tfs"
  require "cigale/scm/workspace"
  require "cigale/scm/hg"
  require "cigale/scm/store"
  require "cigale/scm/svn"

  def scm_classes
    @scm_classes ||= {
      "nil" => "hudson.scm.NullSCM",
      "git" => "hudson.plugins.git.GitSCM",
      "repo" => "hudson.plugins.repo.RepoScm",
      "tfs" => "hudson.plugins.tfs.TeamFoundationServerScm",
      "workspace" => "hudson.plugins.cloneworkspace.CloneWorkspaceSCM",
      "hg" => "hudson.plugins.mercurial.MercurialSCM",
      "store" => "org.jenkinsci.plugins.visualworks_store.StoreSCM",
      "svn" => "hudson.scm.SubversionSCM"
    }
  end

  def translate_scms (xml, scms, multi=false)
    if scms.nil? || scms.size == 0
      return xml.scm :class => scm_classes["nil"]
    end

    if scms.size > 1 and not multi
      puts "scms size = #{scms.size}"
      xml.scm :class => "org.jenkinsci.plugins.multiplescms.MultiSCM" do
        xml.scms do
          translate_scms(xml, scms, true)
        end
      end
      return
    end

    for s in scms
      stype, sdef = first_pair(s)

      case stype
      when "raw"
        for l in sdef["xml"].split("\n")<commit_msg>debug--<commit_after>
module Cigale::SCM
  require "cigale/scm/git"
  require "cigale/scm/repo"
  require "cigale/scm/tfs"
  require "cigale/scm/workspace"
  require "cigale/scm/hg"
  require "cigale/scm/store"
  require "cigale/scm/svn"

  def scm_classes
    @scm_classes ||= {
      "nil" => "hudson.scm.NullSCM",
      "git" => "hudson.plugins.git.GitSCM",
      "repo" => "hudson.plugins.repo.RepoScm",
      "tfs" => "hudson.plugins.tfs.TeamFoundationServerScm",
      "workspace" => "hudson.plugins.cloneworkspace.CloneWorkspaceSCM",
      "hg" => "hudson.plugins.mercurial.MercurialSCM",
      "store" => "org.jenkinsci.plugins.visualworks_store.StoreSCM",
      "svn" => "hudson.scm.SubversionSCM"
    }
  end

  def translate_scms (xml, scms, multi=false)
    if scms.nil? || scms.size == 0
      return xml.scm :class => scm_classes["nil"]
    end

    if scms.size > 1 and not multi
      xml.scm :class => "org.jenkinsci.plugins.multiplescms.MultiSCM" do
        xml.scms do
          translate_scms(xml, scms, true)
        end
      end
      return
    end

    for s in scms
      stype, sdef = first_pair(s)

      case stype
      when "raw"
        for l in sdef["xml"].split("\n")
{'fraction_non_alphanumeric': 0.142681929681112, 'fraction_numerical': 0.001635322976287817, 'mean_word_length': 2.6576980568011956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, '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': '7613492', 'n_tokens_mistral': 988, 'n_tokens_neox': 936, 'n_words': 173}