<commit_before>package com.cepw;

import com.cepw.model.KrbConf;
import com.cepw.model.node.ComplexKeyValuesNode;
import com.cepw.model.node.SimpleKeyValuesNode;
import com.cepw.utils.ObjectUtils;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;

public class Example {

  public static void main(String[] args) {
    try {
      System.out.println("=== Empty KrbConf ===");
      KrbConf emptyConf = new KrbConf();
      System.out.println("Object Size: " + ObjectUtils.serialize(emptyConf).length);
      System.out.println(emptyConf);
      System.out.println();

      System.out.println("=== New KrbConf ===");
      KrbConf newConf = new KrbConf();
      newConf.getLibDefaults().add(new SimpleKeyValuesNode("default_realm", "CEPW.CO.NZ"));
      newConf.getDomainRealm().add(new SimpleKeyValuesNode("cepw.co.nz", "CEPW.CO.NZ"));
      newConf.getDomainRealm().add(new SimpleKeyValuesNode(".cepw.co.nz", "CEPW.CO.NZ"));
      newConf.getRealms().add(new ComplexKeyValuesNode("CEPW.CO.NZ",
              new SimpleKeyValuesNode("master_kdc", "cepw-alpha.domain.co.nz"),
              new SimpleKeyValuesNode("admin_server", "cepw-gamma.domain.co.nz"),
              new SimpleKeyValuesNode("kdc", "cepw-alpha.domain.co.nz"),
              new SimpleKeyValuesNode("kdc", "cpew-beta.domain.co.nz")));

      newConf.getRealms().add(new ComplexKeyValuesNode("CEPW.CO.NZ",
              new SimpleKeyValuesNode("kdc", "cpew-omega.domain.co.nz"),
              new SimpleKeyValuesNode("default_domain", "mit.edu")));
      newConf.getDomainRealm().remove("cepw.co.nz");
      System.out.println("Object Size: " + ObjectUtils.serialize(newConf).length);
      System.out.println(newConf);
      System.out.println();

      System.out.println("=== Parsed KrbConf ===");
      File krb5Conf = new File("krb5.conf");
      KrbConf conf = KrbConfParser.parse(krb5Conf);
      System.out.println("Object Size: " + ObjectUtils.serialize(conf).length);
      System.out.println(conf);
      System.out.println("---");

      File outputFile = new File("doge.conf");
      BufferedWriter out = new BufferedWriter(new FileWriter(outputFile));
      out.write(conf.toString());
      out.close();<commit_msg>Modified example output file name.<commit_after>package com.cepw;

import com.cepw.model.KrbConf;
import com.cepw.model.node.ComplexKeyValuesNode;
import com.cepw.model.node.SimpleKeyValuesNode;
import com.cepw.utils.ObjectUtils;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;

public class Example {

  public static void main(String[] args) {
    try {
      System.out.println("=== Empty KrbConf ===");
      KrbConf emptyConf = new KrbConf();
      System.out.println("Object Size: " + ObjectUtils.serialize(emptyConf).length);
      System.out.println(emptyConf);
      System.out.println();

      System.out.println("=== New KrbConf ===");
      KrbConf newConf = new KrbConf();
      newConf.getLibDefaults().add(new SimpleKeyValuesNode("default_realm", "CEPW.CO.NZ"));
      newConf.getDomainRealm().add(new SimpleKeyValuesNode("cepw.co.nz", "CEPW.CO.NZ"));
      newConf.getDomainRealm().add(new SimpleKeyValuesNode(".cepw.co.nz", "CEPW.CO.NZ"));
      newConf.getRealms().add(new ComplexKeyValuesNode("CEPW.CO.NZ",
              new SimpleKeyValuesNode("master_kdc", "cepw-alpha.domain.co.nz"),
              new SimpleKeyValuesNode("admin_server", "cepw-gamma.domain.co.nz"),
              new SimpleKeyValuesNode("kdc", "cepw-alpha.domain.co.nz"),
              new SimpleKeyValuesNode("kdc", "cpew-beta.domain.co.nz")));

      newConf.getRealms().add(new ComplexKeyValuesNode("CEPW.CO.NZ",
              new SimpleKeyValuesNode("kdc", "cpew-omega.domain.co.nz"),
              new SimpleKeyValuesNode("default_domain", "mit.edu")));
      newConf.getDomainRealm().remove("cepw.co.nz");
      System.out.println("Object Size: " + ObjectUtils.serialize(newConf).length);
      System.out.println(newConf);
      System.out.println();

      System.out.println("=== Parsed KrbConf ===");
      File krb5Conf = new File("krb5.conf");
      KrbConf conf = KrbConfParser.parse(krb5Conf);
      System.out.println("Object Size: " + ObjectUtils.serialize(conf).length);
      System.out.println(conf);
      System.out.println("---");

      File outputFile = new File("output.conf");
      BufferedWriter out = new BufferedWriter(new FileWriter(outputFile));
      out.write(conf.toString());
      out.close();
{'fraction_non_alphanumeric': 0.15874079035498995, 'fraction_numerical': 0.0013395847287340924, 'mean_word_length': 3.5714285714285716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '6701573', 'n_tokens_mistral': 1462, 'n_tokens_neox': 1431, 'n_words': 217}