<commit_before>package br.usp.ime.choreos.nodepoolmanager;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;

@Path("/nodes/{node_id:.+}")
public class NodeResource {

    @GET
    public Response getNode(@PathParam("node_id") String id) {
        Infrastructure infrastructure = new Infrastructure();
        Node node;
        Response response;

        try {
            node = infrastructure.getNode(id);
            response = Response.ok(node).build();
        } catch (NodeNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            response = Response.status(Status.NOT_FOUND).build();
        }

        return response;
    }

    @DELETE
    public Response deleteNode(@PathParam("node_id") String id) {
        Infrastructure infrastructure = new Infrastructure();
        infrastructure.destroyNode(id);<commit_msg>Removed caught stack trace output. Trying to avoid random test failures.<commit_after>package br.usp.ime.choreos.nodepoolmanager;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;

@Path("/nodes/{node_id:.+}")
public class NodeResource {

    @GET
    public Response getNode(@PathParam("node_id") String id) {
        Response response;
        Infrastructure infrastructure = new Infrastructure();

        try {
            Node node = infrastructure.getNode(id);
            response = Response.ok(node).build();
        } catch (NodeNotFoundException e) {
            response = Response.status(Status.NOT_FOUND).build();
        }

        return response;
    }

    @DELETE
    public Response deleteNode(@PathParam("node_id") String id) {
        Infrastructure infrastructure = new Infrastructure();
        infrastructure.destroyNode(id);
{'fraction_non_alphanumeric': 0.11417125688532799, 'fraction_numerical': 0.0, 'mean_word_length': 2.9176470588235293, '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': '6723968', 'n_tokens_mistral': 553, 'n_tokens_neox': 541, 'n_words': 123}