<commit_before>package de.java.commit;

import de.java.commit.application.Application;
import de.java.commit.configration.Configurable;
import de.java.commit.configration.Configuration;
import de.java.commit.rule.CommitRule;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.PropertySources;

@PropertySources({
    @PropertySource("classpath:default.properties"),
    //@PropertySource("file:${APP_PROPERTIES}")
})
@ComponentScan
public class Main {

    /**
     * Main entry point.
     *
     * @param args Command line arguments <p>First argument is the commit file location</p>
     */
    public static void main(String[] args) {

        try {
            //Convert input commit file to list and filter all commented lines
            List<String> fileContent = Files.lines(Paths.get(args[0]))
                .filter(Main::filterCommentedLines)
                .collect(Collectors.toList());

            //Instance application context
            ApplicationContext ctx = new AnnotationConfigApplicationContext(Main.class);

            // Get configuration bean<commit_msg>Removes outside properties<commit_after>package de.java.commit;

import de.java.commit.application.Application;
import de.java.commit.configration.Configurable;
import de.java.commit.configration.Configuration;
import de.java.commit.rule.CommitRule;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.PropertySources;

@PropertySources({
    @PropertySource("classpath:default.properties")
})
@ComponentScan
public class Main {

    /**
     * Main entry point.
     *
     * @param args Command line arguments <p>First argument is the commit file location</p>
     */
    public static void main(String[] args) {

        try {
            //Convert input commit file to list and filter all commented lines
            List<String> fileContent = Files.lines(Paths.get(args[0]))
                .filter(Main::filterCommentedLines)
                .collect(Collectors.toList());

            //Instance application context
            ApplicationContext ctx = new AnnotationConfigApplicationContext(Main.class);

            // Get configuration bean
{'fraction_non_alphanumeric': 0.09742519137091162, 'fraction_numerical': 0.0006958942240779402, 'mean_word_length': 3.7916666666666665, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '235706', 'n_tokens_mistral': 722, 'n_tokens_neox': 708, 'n_words': 164}