<commit_before>package io.spacedog.client.log;

import java.util.List;
import java.util.Set;

import org.joda.time.DateTime;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.collect.Sets;

import io.spacedog.client.credentials.Credentials;

@JsonIgnoreProperties(ignoreUnknown = true)
public final class LogItem {
	public String method;
	public String path;
	public DateTime receivedAt;
	public int processedIn;
	public int status;
	public Credentials credentials;
	public List<String> headers;
	public List<String> parameters;
	public ObjectNode payload;
	public ObjectNode response;

	public String getParameter(String name) {
		for (String string : parameters) {
			String[] parts = string.split(": ", 2);
			if (parts[0].equals(name))
				return parts[1];
		}
		return null;
	}

	public Set<String> getHeader(String name) {
		Set<String> values = Sets.newHashSet();
		for (String string : headers) {
			String[] parts = string.split(": ", 2);
			if (parts[0].equals(name))
				values.add(parts[1]);
		}
		return values;
	}
}<commit_msg>Fix LogItem to only map credentials id, username and roles<commit_after>package io.spacedog.client.log;

import java.util.List;
import java.util.Set;

import org.joda.time.DateTime;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.collect.Sets;

@JsonIgnoreProperties(ignoreUnknown = true)
public final class LogItem {
	public String method;
	public String path;
	public DateTime receivedAt;
	public int processedIn;
	public int status;
	public CredentialsResume credentials;
	public List<String> headers;
	public List<String> parameters;
	public ObjectNode payload;
	public ObjectNode response;

	public String getParameter(String name) {
		for (String string : parameters) {
			String[] parts = string.split(": ", 2);
			if (parts[0].equals(name))
				return parts[1];
		}
		return null;
	}

	public Set<String> getHeader(String name) {
		Set<String> values = Sets.newHashSet();
		for (String string : headers) {
			String[] parts = string.split(": ", 2);
			if (parts[0].equals(name))
				values.add(parts[1]);
		}
		return values;
	}

	public static class CredentialsResume {
		public String id;
		public String username;
		public Set<String> roles;
	}
}
{'fraction_non_alphanumeric': 0.11190276613579211, 'fraction_numerical': 0.005029337803855826, 'mean_word_length': 4.724220623501199, 'pattern_counts': {'":': 4, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '2765090', 'n_tokens_mistral': 801, 'n_tokens_neox': 727, 'n_words': 200}