<commit_before>package astava.java.parser;

import astava.java.gen.ClassGenerator;
import astava.tree.ClassDom;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;

public class Main {
    public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException {
        Parser p = new Parser("public class MyClass { public static int myMethod() { return 666; } }");
        ClassDom c = p.parseClass();
        ClassGenerator generator = new ClassGenerator(c);
        Class<?> gc = generator.newClass();
        Object actualValue = gc.getMethod("myMethod").invoke(null, null);
        System.out.println(actualValue);
    }
}<commit_msg>Added sample usage of ClassDomBuilder.<commit_after>package astava.java.parser;

import astava.java.gen.ClassGenerator;
import astava.tree.ClassDom;
import astava.tree.ClassDomBuilder;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;

public class Main {
    public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException {
        Parser p = new Parser("public class MyClass { public static int myMethod() { return 666; } }");
        ClassDom c = p.parseClass();
        ClassGenerator generator = new ClassGenerator(c);
        Class<?> gc = generator.newClass();
        Object actualValue = gc.getMethod("myMethod").invoke(null, null);
        System.out.println(actualValue);

        ClassDomBuilder classBuilder = new ClassDomBuilder();

        classBuilder.setFrom(new Parser("public class MyClass { }").parseClass());
        classBuilder.getMethods().add(new Parser("public static int myMethod() { int i = 777; return i; }").parseMethod());

        generator = new ClassGenerator(classBuilder);
        gc = generator.newClass();
        actualValue = gc.getMethod("myMethod").invoke(null, null);
        System.out.println(actualValue);
    }
}
{'fraction_non_alphanumeric': 0.10796545105566219, 'fraction_numerical': 0.004318618042226488, 'mean_word_length': 4.251889168765743, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6717826', 'n_tokens_mistral': 559, 'n_tokens_neox': 542, 'n_words': 139}