<commit_before>package com.hubspot.baragon.service.resources;

import java.util.Collection;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.xml.ws.Service;

import com.google.common.base.Optional;
import com.google.inject.Inject;
import com.hubspot.baragon.data.BaragonLoadBalancerDatastore;
import com.hubspot.baragon.data.BaragonStateDatastore;
import com.hubspot.baragon.managers.ServiceManager;
import com.hubspot.baragon.models.BaragonService;
import com.hubspot.baragon.models.BaragonServiceState;
import com.hubspot.baragon.models.UpstreamInfo;

@Path("/state")
@Produces(MediaType.APPLICATION_JSON)
public class StateResource {
  private final ServiceManager manager;

  @Inject
  public StateResource(ServiceManager manager) {
    this.manager = manager;
  }

  @GET
  public Collection<BaragonServiceState> getAllServices() {
    return manager.getAllServices();
  }

  @GET
  @Path("/{serviceId}")
  public Optional<BaragonServiceState> getService(@PathParam("serviceId") String serviceId) {
    return manager.getService(serviceId);
  }

  @DELETE
  @Path("/{serviceId}")
  public Optional<BaragonServiceState> removeService(@PathParam("serviceId") String serviceId) {
    return manager.removeService(serviceId);
  }
}<commit_msg>cleanup imports<commit_after>package com.hubspot.baragon.service.resources;

import java.util.Collection;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.google.common.base.Optional;
import com.google.inject.Inject;
import com.hubspot.baragon.managers.ServiceManager;
import com.hubspot.baragon.models.BaragonServiceState;

@Path("/state")
@Produces(MediaType.APPLICATION_JSON)
public class StateResource {
  private final ServiceManager manager;

  @Inject
  public StateResource(ServiceManager manager) {
    this.manager = manager;
  }

  @GET
  public Collection<BaragonServiceState> getAllServices() {
    return manager.getAllServices();
  }

  @GET
  @Path("/{serviceId}")
  public Optional<BaragonServiceState> getService(@PathParam("serviceId") String serviceId) {
    return manager.getService(serviceId);
  }

  @DELETE
  @Path("/{serviceId}")
  public Optional<BaragonServiceState> removeService(@PathParam("serviceId") String serviceId) {
    return manager.removeService(serviceId);
  }
}
{'fraction_non_alphanumeric': 0.11685214626391097, 'fraction_numerical': 0.0, 'mean_word_length': 5.606299212598425, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '2374747', 'n_tokens_mistral': 788, 'n_tokens_neox': 788, 'n_words': 137}