<commit_before>package sk.atris.netxms.confrepo.service.parser;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
import org.jdom2.input.SAXBuilder;
import org.jdom2.output.XMLOutputter;
import sk.atris.netxms.confrepo.enums.NetxmsConfigSections;
import sk.atris.netxms.confrepo.exceptions.NetxmsXmlConfigParserException;
import sk.atris.netxms.confrepo.model.entities.*;
import sk.atris.netxms.confrepo.model.netxmsConfig.NetxmsConfig;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

@Slf4j
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class NetxmsXmlConfigParser {
    @Getter
    private final static NetxmsXmlConfigParser instance = new NetxmsXmlConfigParser();

    private final SAXBuilder saxBuilder = new SAXBuilder();
    private final XMLOutputter xmlOutputter = new XMLOutputter();<commit_msg>Revision XML code is now held in compact format internally (more efficient, also helps with huge database row requirements)<commit_after>package sk.atris.netxms.confrepo.service.parser;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
import org.jdom2.input.SAXBuilder;
import org.jdom2.output.Format;
import org.jdom2.output.XMLOutputter;
import sk.atris.netxms.confrepo.enums.NetxmsConfigSections;
import sk.atris.netxms.confrepo.exceptions.NetxmsXmlConfigParserException;
import sk.atris.netxms.confrepo.model.entities.*;
import sk.atris.netxms.confrepo.model.netxmsConfig.NetxmsConfig;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

@Slf4j
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class NetxmsXmlConfigParser {
    @Getter
    private final static NetxmsXmlConfigParser instance = new NetxmsXmlConfigParser();

    private final SAXBuilder saxBuilder = new SAXBuilder();
    private final XMLOutputter xmlOutputter = new XMLOutputter(Format.getCompactFormat());
{'fraction_non_alphanumeric': 0.0890316659017898, 'fraction_numerical': 0.007801743919229004, 'mean_word_length': 6.290969899665551, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4630563', 'n_tokens_mistral': 741, 'n_tokens_neox': 719, 'n_words': 141}