<commit_before>package org.project.neutrino.nfvo.core.cli;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Component;

import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 * Created by lto on 16/04/15.
 */
@Component
public class CLIBean implements CommandLineRunner{

    private Logger log = LoggerFactory.getLogger(this.getClass());

    @Autowired
    ConfigurableApplicationContext configurableApplicationContext;

    @Override
    public void run(String... strings) throws Exception {

        BufferedReader br =
                new BufferedReader(new InputStreamReader(System.in));

        String input;
        System.out.print(">> ");
        boolean exit = false;
        while (!exit && (input = br.readLine()) != null) {
            System.out.print(">> ");

            switch (input.toLowerCase()) {
                case "exit":
                    configurableApplicationContext.close();
                    exit = true;
                    break;
                default:


            }
        }
    }
}<commit_msg>Add option for listing all beans<commit_after>package org.project.neutrino.nfvo.core.cli;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Component;

import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 * Created by lto on 16/04/15.
 */
@Component
public class CLIBean implements CommandLineRunner{

    private Logger log = LoggerFactory.getLogger(this.getClass());

    @Autowired
    ConfigurableApplicationContext configurableApplicationContext;

    @Override
    public void run(String... strings) throws Exception {

        BufferedReader br =
                new BufferedReader(new InputStreamReader(System.in));

        String input;
        System.out.print(">> ");
        boolean exit = false;
        while (!exit && (input = br.readLine()) != null) {
            System.out.print(">> ");

            switch (input.toLowerCase()) {
                case "exit":
                    configurableApplicationContext.close();
                    exit = true;
                    break;
                case "list beans":
                    for (String s: configurableApplicationContext.getBeanDefinitionNames())
                        log.info(s);
                default:


            }
        }
    }
}
{'fraction_non_alphanumeric': 0.09930883957802837, 'fraction_numerical': 0.005820298290287377, 'mean_word_length': 2.4461152882205512, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 11, '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': '2404027', 'n_tokens_mistral': 719, 'n_tokens_neox': 694, 'n_words': 151}