<commit_before>package ru.tehkode.permissions.backends;

import ru.tehkode.permissions.PermissionsData;
import ru.tehkode.permissions.PermissionsGroupData;
import ru.tehkode.permissions.PermissionsUserData;

import java.util.List;
import java.util.Map;

/**
 * Helper class to hold static methods relating to import/export between backends.
 * Should be refactored to be interface methods in jdk8
 */
public class BackendDataTransfer {
	private BackendDataTransfer() {
		// NO NO NO
	}

	private static void transferBase(PermissionsData from, PermissionsData to) {
		for (Map.Entry<String, List<String>> entry : from.getPermissionsMap().entrySet()) {
			to.setPermissions(entry.getValue(), entry.getKey());
		}

		for (Map.Entry<String, Map<String, String>> entry : from.getOptionsMap().entrySet()) {
			for (Map.Entry<String, String> option : entry.getValue().entrySet()) {
				to.setOption(option.getKey(), entry.getKey(), option.getValue());
			}
		}

		to.setParents(from.getParents(null), null);
		to.setPrefix(from.getPrefix(null), null);
		to.setSuffix(from.getSuffix(null), null);
		for (String world : from.getWorlds()) {
			List<String> groups =  from.getParents(world);<commit_msg>Fix arg order in BackendDataTransfer<commit_after>package ru.tehkode.permissions.backends;

import ru.tehkode.permissions.PermissionsData;
import ru.tehkode.permissions.PermissionsGroupData;
import ru.tehkode.permissions.PermissionsUserData;

import java.util.List;
import java.util.Map;

/**
 * Helper class to hold static methods relating to import/export between backends.
 * Should be refactored to be interface methods in jdk8
 */
public class BackendDataTransfer {
	private BackendDataTransfer() {
		// NO NO NO
	}

	private static void transferBase(PermissionsData from, PermissionsData to) {
		for (Map.Entry<String, List<String>> entry : from.getPermissionsMap().entrySet()) {
			to.setPermissions(entry.getValue(), entry.getKey());
		}

		for (Map.Entry<String, Map<String, String>> entry : from.getOptionsMap().entrySet()) {
			for (Map.Entry<String, String> option : entry.getValue().entrySet()) {
				to.setOption(option.getKey(), option.getValue(), entry.getKey());
			}
		}

		to.setParents(from.getParents(null), null);
		to.setPrefix(from.getPrefix(null), null);
		to.setSuffix(from.getSuffix(null), null);
		for (String world : from.getWorlds()) {
			List<String> groups =  from.getParents(world);
{'fraction_non_alphanumeric': 0.13211466555878687, 'fraction_numerical': 0.0008309098462816784, 'mean_word_length': 5.127226463104326, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1374386', 'n_tokens_mistral': 796, 'n_tokens_neox': 759, 'n_words': 165}