<commit_before>package nz.org.hikari.cat.ncdc_download;

import java.util.Map.Entry;
import java.util.TreeMap;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;

// Print Hadoop configuration, taken from <NAME>, "Hadoop: The Definitive Guide"
// (4th ed, O'Reilly, 2015), p. 149

public class ConfigurationPrinter extends Configured implements Tool {

	static {
		Configuration.addDefaultResource("hdfs-default.xml");
		Configuration.addDefaultResource("hdfs-site.xml");
		Configuration.addDefaultResource("mapred-default.xml");
		Configuration.addDefaultResource("mapred-site.xml");
		Configuration.addDefaultResource("yarn-default.xml");
		Configuration.addDefaultResource("yarn-site.xml");
	}

	@Override
	public int run(String[] args) throws Exception {
		Configuration conf = getConf();
		TreeMap<String, String> map = new TreeMap<>();
		for (Entry<String, String> entry : conf) {
			map.put(entry.getKey(), entry.getValue());
		}
		for (Entry<String, String> entry : map.entrySet()) {
			System.out.printf("%s=%s\n", entry.getKey(), entry.getValue());
		}
		return 0;
	}

	public static void main(String[] args) throws Exception {
		System.exit(ToolRunner.run(new ConfigurationPrinter(), args));
	}

}<commit_msg>Use Map in ConfigurationPrinter<commit_after>package nz.org.hikari.cat.ncdc_download;

import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;

// Print Hadoop configuration, taken from <NAME>, "Hadoop: The Definitive Guide"
// (4th ed, O'Reilly, 2015), p. 149

public class ConfigurationPrinter extends Configured implements Tool {

	static {
		Configuration.addDefaultResource("hdfs-default.xml");
		Configuration.addDefaultResource("hdfs-site.xml");
		Configuration.addDefaultResource("mapred-default.xml");
		Configuration.addDefaultResource("mapred-site.xml");
		Configuration.addDefaultResource("yarn-default.xml");
		Configuration.addDefaultResource("yarn-site.xml");
	}

	@Override
	public int run(String[] args) throws Exception {
		Configuration conf = getConf();
		Map<String, String> map = new TreeMap<>();
		for (Entry<String, String> entry : conf) {
			map.put(entry.getKey(), entry.getValue());
		}
		for (Entry<String, String> entry : map.entrySet()) {
			System.out.printf("%s=%s\n", entry.getKey(), entry.getValue());
		}
		return 0;
	}

	public static void main(String[] args) throws Exception {
		System.exit(ToolRunner.run(new ConfigurationPrinter(), args));
	}

}
{'fraction_non_alphanumeric': 0.14227642276422764, 'fraction_numerical': 0.0066518847006651885, 'mean_word_length': 5.2953488372093025, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6991467', 'n_tokens_mistral': 891, 'n_tokens_neox': 831, 'n_words': 177}