<commit_before>package api.webservice;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import api.beans.request.ChangePasswordTokenBeanRequest;
import api.beans.request.DumpObjectRequest;
import api.beans.request.InitTokenBeanRequest;
import api.beans.request.InitUserPasswordTokenBeanRequest;
import api.beans.response.KeyPairBeanResponse;
import api.beans.response.RandomBeanResponse;
import api.beans.response.SecretKeyBeanResponse;
import api.beans.response.TokenInfoResponse;
import api.beans.response.TokenMechanismsBeanResponse;
import api.beans.response.DumpTokenBeanResponse;
import api.beans.response.ListTokenBeanResponse;

import api.webservice.implementation.TokenMechanismWebServiceImplementation;
import api.webservice.implementation.TokenWebServiceImplementation;

@Path("token")
public class TokenWebService {
	@GET
	@Produces({ MediaType.APPLICATION_JSON })
	@Path("info/{idToken}")
	public TokenInfoResponse tokenInfos(@Context HttpServletRequest req, @PathParam("idToken") int idToken,
			@QueryParam("select") List<String> select) {
		return new TokenWebServiceImplementation().tokenInfos(req, idToken, select);
	}

	@PUT
	@Consumes({ MediaType.APPLICATION_JSON })
	@Produces({ MediaType.APPLICATION_JSON })
	@Path("init/{idToken}")
	public Response init(@Context HttpServletRequest req, InitTokenBeanRequest r, @PathParam("idToken") int idToken) {
		return new TokenWebServiceImplementation().init(req, r, idToken);

	}

	@PUT
	@Consumes({ MediaType.APPLICATION_JSON })
	@Produces({ MediaType.APPLICATION_JSON })
	@Path("reset/{idToken}")
	public Response reset(@Context HttpServletRequest req, InitTokenBeanRequest r, @PathParam("idToken") int idToken) {
		return new TokenWebServiceImplementation().reset(req, r, idToken);

	}
	
	@PUT
	@Consumes({ MediaType.APPLICATION_JSON })
	@Path("changePW/{idToken}")
	public Response changePassword(@Context HttpServletRequest req, ChangePasswordTokenBeanRequest r, @PathParam("idToken") int idToken) {
		return new TokenWebServiceImplementation().changePassword(req, r, idToken);

	}
	
	@PUT
	@Consumes({ MediaType.APPLICATION_JSON })
	@Path("initUserPin/{idToken}")
	public Response initUserPin(@Context HttpServletRequest req, InitUserPasswordTokenBeanRequest r, @PathParam("idToken") int idToken) {
		return new TokenWebServiceImplementation().initUserPin(req, r, idToken);
	
	}

	@GET
	@Produces({ MediaType.APPLICATION_JSON })
	@Path("mechanisms/{idToken}")
	public TokenMechanismsBeanResponse tokenMechanisms(@Context HttpServletRequest req, @PathParam("idToken") int idToken,
			@QueryParam("select") List<String> select) {
		return new TokenMechanismWebServiceImplementation().tokenMechanisms(req, idToken, select);

	}
	
	@GET
	@Produces({ MediaType.APPLICATION_JSON })	
	@Path("SecretKey/{idToken}")
	public SecretKeyBeanResponse genSecretKey(@Context HttpServletRequest req, @PathParam("idToken") int idToken) {
		return new TokenMechanismWebServiceImplementation().genSecretKey(req, idToken);
	}
	
	@GET
	@Produces({ MediaType.APPLICATION_JSON })	
	@Path("KeyPair/{idToken}")
	public KeyPairBeanResponse genKeyPair(@Context HttpServletRequest req, @PathParam("idToken") int idToken) {
		return new TokenMechanismWebServiceImplementation().genKeyPair(req, idToken);
	}

	@GET
	@Produces({ MediaType.APPLICATION_JSON })
	@Path("random/{idToken}/{nbByte}")
	public RandomBeanResponse tokenGetRandom(@Context HttpServletRequest req, @PathParam("idToken") int idToken, @PathParam("nbByte") int nbByte) {
		return new TokenWebServiceImplementation().tokenGetRandom(req, idToken, nbByte);
	}
	@GET
	@Produces({ MediaType.APPLICATION_JSON })
	@Path("object/{idToken}/")
	public ListTokenBeanResponse listObject(@Context HttpServletRequest req, @PathParam("idToken") int idToken) {
		return new TokenWebServiceImplementation().listObject(req, idToken);

	}
	@PUT
	@Produces({ MediaType.APPLICATION_JSON })
	@Consumes({ MediaType.APPLICATION_JSON })
	@Path("object/dump/{idToken}/")
	public DumpTokenBeanResponse tokenDumpObject(@Context HttpServletRequest req, DumpObjectRequest rb, @PathParam("idToken") int idToken) {
		return new TokenWebServiceImplementation().tokenDumpObject(req, rb, idToken);

	}
	@DELETE
	@Path("object/{idToken}/{handleObject}")
	public Response tokenDumpObject(@Context HttpServletRequest req, @PathParam("idToken") int idToken, @PathParam("handleObject") int handleObject) {
		return new TokenWebServiceImplementation().deleteObject(req, idToken, handleObject);

	}
}<commit_msg>Try to fix method not allowed<commit_after>package api.webservice;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import api.beans.request.ChangePasswordTokenBeanRequest;
import api.beans.request.DumpObjectRequest;
import api.beans.request.InitTokenBeanRequest;
import api.beans.request.InitUserPasswordTokenBeanRequest;
import api.beans.response.KeyPairBeanResponse;
import api.beans.response.RandomBeanResponse;
import api.beans.response.SecretKeyBeanResponse;
import api.beans.response.TokenInfoResponse;
import api.beans.response.TokenMechanismsBeanResponse;
import api.beans.response.DumpTokenBeanResponse;
import api.beans.response.ListTokenBeanResponse;

import api.webservice.implementation.TokenMechanismWebServiceImplementation;
import api.webservice.implementation.TokenWebServiceImplementation;

@Path("token")
public class TokenWebService {
	@GET
	@Produces({ MediaType.APPLICATION_JSON })
	@Path("info/{idToken}")
	public TokenInfoResponse tokenInfos(@Context HttpServletRequest req, @PathParam("idToken") int idToken,
			@QueryParam("select") List<String> select) {
		return new TokenWebServiceImplementation().tokenInfos(req, idToken, select);
	}

	@PUT
	@Consumes({ MediaType.APPLICATION_JSON })
	@Produces({ MediaType.APPLICATION_JSON })
	@Path("init/{idToken}")
	public Response init(@Context HttpServletRequest req, InitTokenBeanRequest r, @PathParam("idToken") int idToken) {
		return new TokenWebServiceImplementation().init(req, r, idToken);

	}

	@PUT
	@Consumes({ MediaType.APPLICATION_JSON })
	@Produces({ MediaType.APPLICATION_JSON })
	@Path("reset/{idToken}")
	public Response reset(@Context HttpServletRequest req, InitTokenBeanRequest r, @PathParam("idToken") int idToken) {
		return new TokenWebServiceImplementation().reset(req, r, idToken);

	}
	
	@PUT
	@Consumes({ MediaType.APPLICATION_JSON })
	@Path("changePW/{idToken}")
	public Response changePassword(@Context HttpServletRequest req, ChangePasswordTokenBeanRequest r, @PathParam("idToken") int idToken) {
		return new TokenWebServiceImplementation().changePassword(req, r, idToken);

	}
	
	@PUT
	@Consumes({ MediaType.APPLICATION_JSON })
	@Path("initUserPin/{idToken}")
	public Response initUserPin(@Context HttpServletRequest req, InitUserPasswordTokenBeanRequest r, @PathParam("idToken") int idToken) {
		return new TokenWebServiceImplementation().initUserPin(req, r, idToken);
	
	}

	@GET
	@Produces({ MediaType.APPLICATION_JSON })
	@Path("mechanisms/{idToken}")
	public TokenMechanismsBeanResponse tokenMechanisms(@Context HttpServletRequest req, @PathParam("idToken") int idToken,
			@QueryParam("select") List<String> select) {
		return new TokenMechanismWebServiceImplementation().tokenMechanisms(req, idToken, select);

	}
	
	@GET
	@Produces({ MediaType.APPLICATION_JSON })	
	@Path("SecretKey/{idToken}")
	public SecretKeyBeanResponse genSecretKey(@Context HttpServletRequest req, @PathParam("idToken") int idToken) {
		return new TokenMechanismWebServiceImplementation().genSecretKey(req, idToken);
	}
	
	@GET
	@Produces({ MediaType.APPLICATION_JSON })	
	@Path("KeyPair/{idToken}")
	public KeyPairBeanResponse genKeyPair(@Context HttpServletRequest req, @PathParam("idToken") int idToken) {
		return new TokenMechanismWebServiceImplementation().genKeyPair(req, idToken);
	}

	@GET
	@Produces({ MediaType.APPLICATION_JSON })
	@Path("random/{idToken}/{nbByte}")
	public RandomBeanResponse tokenGetRandom(@Context HttpServletRequest req, @PathParam("idToken") int idToken, @PathParam("nbByte") int nbByte) {
		return new TokenWebServiceImplementation().tokenGetRandom(req, idToken, nbByte);
	}
	@GET
	@Produces({ MediaType.APPLICATION_JSON })
	@Path("object/{idToken}")
	public ListTokenBeanResponse listObject(@Context HttpServletRequest req, @PathParam("idToken") int idToken) {
		return new TokenWebServiceImplementation().listObject(req, idToken);

	}
	@PUT
	@Produces({ MediaType.APPLICATION_JSON })
	@Consumes({ MediaType.APPLICATION_JSON })
	@Path("object/dump/{idToken}")
	public DumpTokenBeanResponse tokenDumpObject(@Context HttpServletRequest req, DumpObjectRequest rb, @PathParam("idToken") int idToken) {
		return new TokenWebServiceImplementation().tokenDumpObject(req, rb, idToken);

	}
	@DELETE
	@Path("object/{idToken}/{handleObject}")
	public Response tokenDumpObject(@Context HttpServletRequest req, @PathParam("idToken") int idToken, @PathParam("handleObject") int handleObject) {
		return new TokenWebServiceImplementation().deleteObject(req, idToken, handleObject);

	}
}
{'fraction_non_alphanumeric': 0.11932877563704164, 'fraction_numerical': 0.0, 'mean_word_length': 7.469298245614035, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6433151', 'n_tokens_mistral': 2998, 'n_tokens_neox': 2932, 'n_words': 575}