<commit_before>package com.codingbrothers.futurimages.util;

import java.io.IOException;

import javax.inject.Inject;
import javax.inject.Singleton;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import com.google.inject.Provider;
import com.googlecode.objectify.Objectify;
import com.googlecode.objectify.util.AbstractFilter;

@Singleton
public class ObjectifySessionClearingFilter extends AbstractFilter {

	private final Provider<Objectify> objectifyProvider;

	@Inject
	public ObjectifySessionClearingFilter(Provider<Objectify> objectifyProvider) {
		this.objectifyProvider = objectifyProvider;
	}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
			ServletException {
		try {
			chain.doFilter(request, response);
		} finally {
			objectifyProvider.get().clear();
		}
	}
}<commit_msg>Fix ObjectifySessionClearingFilter<commit_after>package com.codingbrothers.futurimages.util;

import java.io.IOException;

import javax.inject.Singleton;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import com.googlecode.objectify.ObjectifyService;
import com.googlecode.objectify.util.AbstractFilter;

@Singleton
public class ObjectifySessionClearingFilter extends AbstractFilter {

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
			ServletException {
		try {
			chain.doFilter(request, response);
		} finally {
			ObjectifyService.ofy().clear();
		}
	}
}
{'fraction_non_alphanumeric': 0.08352941176470588, 'fraction_numerical': 0.0, 'mean_word_length': 6.56, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4048856', 'n_tokens_mistral': 497, 'n_tokens_neox': 467, 'n_words': 97}