<commit_before>package foodtruck.server.dashboard;

import java.io.IOException;
import java.util.logging.Logger;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;

import com.google.inject.Singleton;

/**
 * @author <EMAIL>
 * @since 11/14/11
 */
@Singleton
public class TruckDashboardServlet extends HttpServlet {
  private static final Logger log = Logger.getLogger(TruckDashboardServlet.class.getName());

  @Override
  protected void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
    final String truckId = req.getRequestURI().substring(1);
    log.info("Loading dashboard for " + truckId);


    final String jsp = "/WEB-INF/jsp/dashboard/truckDashboard.jsp";
    // hack required when using * patterns in guice
    req = new HttpServletRequestWrapper(req) {
      public Object getAttribute(String name) {
        if ("org.apache.catalina.jsp_file".equals(name)) {
          return jsp;
        }
        return super.getAttribute(name);
      }
    };
    req.getRequestDispatcher(jsp).forward(req, resp);
  }
<commit_msg>Added twitter service<commit_after>package foodtruck.server.dashboard;

import java.io.IOException;
import java.util.logging.Logger;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;

import com.google.inject.Inject;
import com.google.inject.Singleton;

import foodtruck.twitter.TwitterService;

/**
 * @author <EMAIL>
 * @since 11/14/11
 */
@Singleton
public class TruckDashboardServlet extends HttpServlet {
  private static final Logger log = Logger.getLogger(TruckDashboardServlet.class.getName());
  private final TwitterService twitterService;

  @Inject
  public TruckDashboardServlet(TwitterService twitterService) {
    this.twitterService = twitterService;
  }

  @Override
  protected void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
    final String truckId = req.getRequestURI().substring(1);
    log.info("Loading dashboard for " + truckId);

    final String jsp = "/WEB-INF/jsp/dashboard/truckDashboard.jsp";
    // hack required when using * patterns in guice
    req = new HttpServletRequestWrapper(req) {
      public Object getAttribute(String name) {
        if ("org.apache.catalina.jsp_file".equals(name)) {
          return jsp;
        }
        return super.getAttribute(name);
      }
    };
    req.getRequestDispatcher(jsp).forward(req, resp);
  }

{'fraction_non_alphanumeric': 0.09971098265895954, 'fraction_numerical': 0.0050578034682080926, 'mean_word_length': 4.214689265536723, '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': '2409093', 'n_tokens_mistral': 790, 'n_tokens_neox': 779, 'n_words': 172}