<commit_before>
package net.ontopia.xml;

import java.util.Stack;
import java.io.*;
import org.xml.sax.*;
import org.xml.sax.helpers.ParserFactory;
import net.ontopia.utils.StringUtils;
import net.ontopia.utils.OntopiaRuntimeException;

/**
 * INTERNAL: SAX document handler that writes pretty-printed XML to a
 * Writer.
 */
public class PrettyPrinter implements DocumentHandler {
  private static final String NL = System.getProperty("line.separator");
  
  protected Writer writer;
  protected String encoding;
  protected boolean[] subelements;
  protected char[] startline; // contains "\n      ...", used for indents
  protected int offset; // width of newline (1-2 chars)
  protected int level; // current element depth

  protected int encodeCharsFrom = -1;
  protected boolean dropControlChars = true; // drop control chars by default<commit_msg>Removed unnecessary import.<commit_after>
package net.ontopia.xml;

import java.util.Stack;
import java.io.*;
import org.xml.sax.*;
import org.xml.sax.helpers.ParserFactory;

import net.ontopia.utils.OntopiaRuntimeException;

/**
 * INTERNAL: SAX document handler that writes pretty-printed XML to a
 * Writer.
 */
public class PrettyPrinter implements DocumentHandler {
  private static final String NL = System.getProperty("line.separator");
  
  protected Writer writer;
  protected String encoding;
  protected boolean[] subelements;
  protected char[] startline; // contains "\n      ...", used for indents
  protected int offset; // width of newline (1-2 chars)
  protected int level; // current element depth

  protected int encodeCharsFrom = -1;
  protected boolean dropControlChars = true; // drop control chars by default
{'fraction_non_alphanumeric': 0.09662122110254891, 'fraction_numerical': 0.0035566093657379964, 'mean_word_length': 4.146341463414634, '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': '3626508', 'n_tokens_mistral': 474, 'n_tokens_neox': 454, 'n_words': 161}