<commit_before>require 'rexml/document'
require 'rexml/element'

module SimpleCov
  module Formatter
    class CoberturaFormatter
      VERSION = '1.0.3'

      RESULT_FILE_NAME = 'coverage.xml'
      DTD_URL = 'http://cobertura.sourceforge.net/xml/coverage-04.dtd'

      def format(result)
        xml_doc = result_to_xml result
        result_path = File.join(SimpleCov.coverage_path, RESULT_FILE_NAME)

        formatter = REXML::Formatters::Pretty.new
        formatter.compact = true
        string_io = StringIO.new
        formatter.write(xml_doc, string_io)<commit_msg>Bump to 1.0.4-dev<commit_after>require 'rexml/document'
require 'rexml/element'

module SimpleCov
  module Formatter
    class CoberturaFormatter
      VERSION = '1.0.4-dev'

      RESULT_FILE_NAME = 'coverage.xml'
      DTD_URL = 'http://cobertura.sourceforge.net/xml/coverage-04.dtd'

      def format(result)
        xml_doc = result_to_xml result
        result_path = File.join(SimpleCov.coverage_path, RESULT_FILE_NAME)

        formatter = REXML::Formatters::Pretty.new
        formatter.compact = true
        string_io = StringIO.new
        formatter.write(xml_doc, string_io)
{'fraction_non_alphanumeric': 0.09450171821305842, 'fraction_numerical': 0.011168384879725086, 'mean_word_length': 3.059233449477352, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, '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': '2102822', 'n_tokens_mistral': 409, 'n_tokens_neox': 376, 'n_words': 65}