<commit_before>package com.codahale.metrics;

import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;

public class JSON {

    private final Map<String, String> entries;

    public void add(final String key, final Object value) {
        entries.put(key, value.toString());
    }

    public String render() {

        String res = "{\n";

        for (final Entry<String, String> e : entries.entrySet()) {
            res += "    " + e.getKey() + ": '" + e.getValue() + "',\n";
        }

        res += "}";

        return res;

    }

    public JSON() {
        super();
        this.entries = new HashMap<String, String>();
    }

}
<commit_msg>Implementing first version of lightweight metrics Autocommit Fri Jan 09 09:44:19 EST 2015<commit_after>package com.codahale.metrics;

import java.util.ArrayList;
import java.util.Map.Entry;

public class JSON {

    private final List<Entry<String, String>> entries;

    public void add(final String key, final Object value) {
        entries.put(key, value.toString());
    }

    public String render() {

        String res = "{\n";

        for (final Entry<String, String> e : entries.entrySet()) {
            res += "    " + e.getKey() + ": '" + e.getValue() + "',\n";
        }

        res += "}";

        return res;

    }

    public JSON() {
        super();
        this.entries = new ArrayList<Entry<String, String>>();
    }

}

{'fraction_non_alphanumeric': 0.14587737843551796, 'fraction_numerical': 0.008456659619450317, 'mean_word_length': 2.279445727482679, 'pattern_counts': {'":': 2, '<': 11, '<?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': '2641087', 'n_tokens_mistral': 450, 'n_tokens_neox': 420, 'n_words': 114}