<commit_before>package edu.pdx.cs410J.servlets;

import edu.pdx.cs410J.rmi.Movie;
import edu.pdx.cs410J.rmi.MovieDatabase;
import edu.pdx.cs410J.rmi.MovieDatabaseImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.rmi.RemoteException;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;

import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND;

/**
 * A servlet that provides REST access to a movie database
 */
public class MovieDatabaseServlet extends HttpServlet {
  private MovieDatabase database;

  enum DataType {
    MOVIE, ACTOR, CHARACTER, UNKNOWN
  }

  @Override
  public void init() throws ServletException {
    try {
      this.database = new MovieDatabaseImpl();

    } catch (RemoteException ex) {
      throw new ServletException(ex);
    }
  }

  /**<commit_msg>Fix another usage of RMI code that has changed.<commit_after>package edu.pdx.cs410J.servlets;

import edu.pdx.cs410J.rmi.Movie;
import edu.pdx.cs410J.rmi.MovieDatabase;
import edu.pdx.cs410J.rmi.MovieDatabaseImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.rmi.RemoteException;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;

import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND;

/**
 * A servlet that provides REST access to a movie database
 */
public class MovieDatabaseServlet extends HttpServlet {
  private MovieDatabase database;

  enum DataType {
    MOVIE, ACTOR, CHARACTER, UNKNOWN
  }

  @Override
  public void init() throws ServletException {
    this.database = new MovieDatabaseImpl();
  }

  /**
{'fraction_non_alphanumeric': 0.09149722735674677, 'fraction_numerical': 0.011090573012939002, 'mean_word_length': 4.947802197802198, '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': '3523348', 'n_tokens_mistral': 690, 'n_tokens_neox': 666, 'n_words': 153}