<commit_before>package net.apnic.whowas.entity.controller;

import javax.servlet.http.HttpServletRequest;

import net.apnic.whowas.history.ObjectClass;
import net.apnic.whowas.history.ObjectKey;
import net.apnic.whowas.rdap.controller.RDAPControllerUtil;
import net.apnic.whowas.rdap.TopLevelObject;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Rest controller for the RDAP /entity path segment.
 *
 * Controller is responsible for dealing with current state RDAP path segments.
 */
@RestController
@RequestMapping("/entity")
public class EntityRouteController
{
    private final static Logger LOGGER = LoggerFactory.getLogger(EntityRouteController.class);

    private RDAPControllerUtil rdapControllerUtil = null;

    @Autowired
    public EntityRouteController(RDAPControllerUtil rdapControllerUtil)
    {
        this.rdapControllerUtil = rdapControllerUtil;
    }

    /**
     * GET request handler for entity path segment.
     */
    @RequestMapping(value="/{handle}", method=RequestMethod.GET)
    public ResponseEntity<TopLevelObject> entityPathGet(
        HttpServletRequest request,
        @PathVariable("handle") String handle)
    {
        LOGGER.info("entity GET path query for {}", handle);

        return rdapControllerUtil.mostCurrentResponseGet(
            request, new ObjectKey(ObjectClass.ENTITY, handle));
    }

    /**
     * HEAD request handler for entity path segment.
     */
    @RequestMapping(value="/{handle}", method=RequestMethod.HEAD)
    public ResponseEntity<Void> entityPathHead(
        HttpServletRequest request,
        @PathVariable("handle") String handle)
    {
        LOGGER.info("entity HEAD path query for {}", handle);

        return null;
    }
}<commit_msg>Head path segment for entity<commit_after>package net.apnic.whowas.entity.controller;

import javax.servlet.http.HttpServletRequest;

import net.apnic.whowas.history.ObjectClass;
import net.apnic.whowas.history.ObjectKey;
import net.apnic.whowas.rdap.controller.RDAPControllerUtil;
import net.apnic.whowas.rdap.TopLevelObject;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Rest controller for the RDAP /entity path segment.
 *
 * Controller is responsible for dealing with current state RDAP path segments.
 */
@RestController
@RequestMapping("/entity")
public class EntityRouteController
{
    private final static Logger LOGGER = LoggerFactory.getLogger(EntityRouteController.class);

    private RDAPControllerUtil rdapControllerUtil = null;

    @Autowired
    public EntityRouteController(RDAPControllerUtil rdapControllerUtil)
    {
        this.rdapControllerUtil = rdapControllerUtil;
    }

    /**
     * GET request handler for entity path segment.
     */
    @RequestMapping(value="/{handle}", method=RequestMethod.GET)
    public ResponseEntity<TopLevelObject> entityPathGet(
        HttpServletRequest request,
        @PathVariable("handle") String handle)
    {
        LOGGER.info("entity GET path query for {}", handle);

        return rdapControllerUtil.mostCurrentResponseGet(
            request, new ObjectKey(ObjectClass.ENTITY, handle));
    }

    /**
     * HEAD request handler for entity path segment.
     */
    @RequestMapping(value="/{handle}", method=RequestMethod.HEAD)
    public ResponseEntity<Void> entityPathHead(
        HttpServletRequest request,
        @PathVariable("handle") String handle)
    {
        LOGGER.info("entity HEAD path query for {}", handle);

        return rdapControllerUtil.mostCurrentResponseHead(
            request, new ObjectKey(ObjectClass.ENTITY, handle));
    }
}
{'fraction_non_alphanumeric': 0.09402501157943492, 'fraction_numerical': 0.0009263547938860583, 'mean_word_length': 4.160095579450418, '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': '2656036', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1159, 'n_words': 252}