<commit_before>package de.deltatree.social.web.filter.impl;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.brickred.socialauth.AuthProvider;
import org.brickred.socialauth.Contact;
import org.brickred.socialauth.Profile;
import org.brickred.socialauth.SocialAuthManager;

import de.deltatree.social.web.filter.api.SASFHelper;
import de.deltatree.social.web.filter.api.security.SASFSecurityException;
import de.deltatree.social.web.filter.api.security.SASFSocialAuthManager;
import de.deltatree.social.web.filter.impl.props.SASFProperties;

public class DefaultSASFHelper implements SASFHelper {
	private final static String SESSION_KEY = "S_SASFHelper";
	private final static String SESSION_SOCIAL_AUTH_PROVIDER = "SESSION_SOCIAL_AUTH_PROVIDER";
	private final static String SESSION_SOCIAL_AUTH_MANAGER = "SESSION_SOCIAL_AUTH_MANAGER";
	private final static String SESSION_ERROR = "S_SASFError";
	private final static String SESSION_ERROR_CAUSE = "S_SASFErrorCause";
	private final SASFSocialAuthManager sdbSocialAuthManager;
	private final HttpServletRequest request;
	private final HttpSession session;
	private final SASFProperties props;

	public DefaultSASFHelper(final HttpServletRequest req,
			final SASFProperties props,
			final SASFSocialAuthManager sdbSocialAuthManager,
			final HttpSession session) throws SASFSecurityException {
		this.request = req;
		this.props = props;
		this.sdbSocialAuthManager = sdbSocialAuthManager;
		this.session = session;
		setSessionKey();<commit_msg>make the DefaultSASFHelper serializable to avoid the exception: java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute S_SASFHelper see http://code.google.com/p/socialauth/issues/detail?id=313 for details<commit_after>package de.deltatree.social.web.filter.impl;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.brickred.socialauth.AuthProvider;
import org.brickred.socialauth.Contact;
import org.brickred.socialauth.Profile;
import org.brickred.socialauth.SocialAuthManager;

import de.deltatree.social.web.filter.api.SASFHelper;
import de.deltatree.social.web.filter.api.security.SASFSecurityException;
import de.deltatree.social.web.filter.api.security.SASFSocialAuthManager;
import de.deltatree.social.web.filter.impl.props.SASFProperties;

public class DefaultSASFHelper implements SASFHelper, Serializable {
	private final static long serialVersionUID = 2188168359053036053L;
	
	private final static String SESSION_KEY = "S_SASFHelper";
	private final static String SESSION_SOCIAL_AUTH_PROVIDER = "SESSION_SOCIAL_AUTH_PROVIDER";
	private final static String SESSION_SOCIAL_AUTH_MANAGER = "SESSION_SOCIAL_AUTH_MANAGER";
	private final static String SESSION_ERROR = "S_SASFError";
	private final static String SESSION_ERROR_CAUSE = "S_SASFErrorCause";
	private final SASFSocialAuthManager sdbSocialAuthManager;
	private final HttpServletRequest request;
	private final HttpSession session;
	private final SASFProperties props;

	public DefaultSASFHelper(final HttpServletRequest req,
			final SASFProperties props,
			final SASFSocialAuthManager sdbSocialAuthManager,
			final HttpSession session) throws SASFSecurityException {
		this.request = req;
		this.props = props;
		this.sdbSocialAuthManager = sdbSocialAuthManager;
		this.session = session;
		setSessionKey();
{'fraction_non_alphanumeric': 0.07303063457330415, 'fraction_numerical': 0.006017505470459519, 'mean_word_length': 6.830835117773019, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6207327', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1110, 'n_words': 234}