<commit_before>package com.github.aureliano.evtbridge.converter.output;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;

import com.github.aureliano.evtbridge.common.helper.StringHelper;
import com.github.aureliano.evtbridge.converter.ConverterType;
import com.github.aureliano.evtbridge.core.config.IConfigOutput;
import com.github.aureliano.evtbridge.core.config.IConfigurationConverter;

public class OutputConverter implements IConfigurationConverter<List<IConfigOutput>> {

	public OutputConverter() {
		super();
	}

	@Override
	public List<IConfigOutput> convert(Map<String, Object> data) {
		@SuppressWarnings("unchecked")
		List<Map<String, Object>> list = (List<Map<String, Object>>) data.get("outputs");
		
		if (list == null) {
			return Collections.emptyList();
		}
		
		List<IConfigOutput> outputs = new ArrayList<IConfigOutput>();
		
		for (Map<String, Object> outputMap : list) {
			outputs.add(this.convertOutput(outputMap));
		}
		
		return outputs;
	}

	private IConfigOutput convertOutput(Map<String, Object> data) {
		String type = StringHelper.parse(data.get("type"));
		return (IConfigOutput) OutputConverterFactory.createConverter(type).convert(data);
	}
	
	@Override
	public String id() {
		return ConverterType.OUTPUT.name();
	}
}<commit_msg>Find outputConfigs instead of inputs.<commit_after>package com.github.aureliano.evtbridge.converter.output;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import com.github.aureliano.evtbridge.converter.ConverterType;
import com.github.aureliano.evtbridge.core.config.IConfigOutput;
import com.github.aureliano.evtbridge.core.config.IConfigurationConverter;

public class OutputConverter implements IConfigurationConverter<List<IConfigOutput>> {

	public OutputConverter() {
		super();
	}

	@Override
	public List<IConfigOutput> convert(Map<String, Object> data) {
		@SuppressWarnings("unchecked")
		List<Map<String, Object>> list = (List<Map<String, Object>>) data.get("outputConfigs");
		
		if (list == null) {
			return Collections.emptyList();
		}
		
		List<IConfigOutput> outputs = new ArrayList<IConfigOutput>();
		
		for (Map<String, Object> outputMap : list) {
			outputs.add(this.convertOutput(outputMap));
		}
		
		return outputs;
	}

	private IConfigOutput convertOutput(Map<String, Object> data) {
		Iterator<String> keys = data.keySet().iterator();

		String type = (keys.hasNext()) ? keys.next() : "";
		return (IConfigOutput) OutputConverterFactory.createConverter(type).convert(data);
	}
	
	@Override
	public String id() {
		return ConverterType.OUTPUT.name();
	}
}
{'fraction_non_alphanumeric': 0.1268129416139829, 'fraction_numerical': 0.0, 'mean_word_length': 5.577017114914425, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, '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': '5568805', 'n_tokens_mistral': 883, 'n_tokens_neox': 817, 'n_words': 154}