<commit_before>package org.rubin55.silver;

import ch.qos.logback.classic.Logger;

import org.neo4j.driver.v1.AuthTokens;
import org.neo4j.driver.v1.Driver;
import org.neo4j.driver.v1.GraphDatabase;
import org.neo4j.driver.v1.Record;
import org.neo4j.driver.v1.Session;
import org.neo4j.driver.v1.StatementResult;
import org.slf4j.LoggerFactory;

import static org.neo4j.driver.v1.Values.parameters;

class Loader {
    private static final Logger log = (Logger) LoggerFactory.getLogger(Loader.class);
    private static Configuration cfg = Configuration.getInstance();

    public static void load() {
        log.debug("Invoking load routine");
        log.debug("Neo4j connection string is: " + cfg.getNeo4jConnectionString());

        Driver driver = GraphDatabase.driver(cfg.getNeo4jConnectionString(), AuthTokens.basic(cfg.getNeo4jUser(), cfg.getNeo4jPass()));
        Session session = driver.session();


        //StatementResult result = session.run("MATCH (a:Person) WHERE a.name = {name} " +
        //                                    "RETURN a.name AS name, a.title AS title",
        //                                    parameters( "name", "Arthur" ) );

        StatementResult result = session.run("MATCH (n) RETURN n");

        while (result.hasNext()) {
            Record record = result.next();
            System.out.println(record.asMap().toString());
        }

        session.close();
        driver.close();
    }
}<commit_msg>Succesfully got names from Cypher query<commit_after>package org.rubin55.silver;

import ch.qos.logback.classic.Logger;

import org.neo4j.driver.v1.AuthTokens;
import org.neo4j.driver.v1.Driver;
import org.neo4j.driver.v1.GraphDatabase;
import org.neo4j.driver.v1.Record;
import org.neo4j.driver.v1.Session;
import org.neo4j.driver.v1.StatementResult;
import org.slf4j.LoggerFactory;

import static org.neo4j.driver.v1.Values.parameters;

class Loader {
    private static final Logger log = (Logger) LoggerFactory.getLogger(Loader.class);
    private static Configuration cfg = Configuration.getInstance();

    public static void load() {
        log.debug("Invoking load routine");
        log.debug("Neo4j connection string is: " + cfg.getNeo4jConnectionString());

        //Don't use LOAD CSV, as it cannot deal with labels from field values.
        //Don't use neo4j-import tool, because it's an external dependency.

        //Read Michaels' answer here: https://stackoverflow.com/questions/38289595/neo4j-java-bolt-create-node-is-slow-how-to-improve-it

        // Implement custom CSV reader which:
        // Inserts nodes
        // Creates indexes
        // Inserts relations

        Driver driver = GraphDatabase.driver(cfg.getNeo4jConnectionString(),
                AuthTokens.basic(cfg.getNeo4jUser(), cfg.getNeo4jPass()));
        Session session = driver.session();

        StatementResult result = session.run("MATCH (n) RETURN n.name AS name");

        while (result.hasNext()) {
            Record record = result.next();

            System.out.println(record.get("name").toString());
        }

        session.close();
        driver.close();
    }
}
{'fraction_non_alphanumeric': 0.12070063694267516, 'fraction_numerical': 0.017197452229299363, 'mean_word_length': 2.8634686346863467, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6192458', 'n_tokens_mistral': 966, 'n_tokens_neox': 927, 'n_words': 201}