<commit_before>/*
 * Copyright (c) Bounce Storage, Inc. All rights reserved.
 * For more information, please see COPYRIGHT in the top-level directory.
 */

package com.bouncestorage.swiftproxy;

import static org.assertj.core.api.Assertions.assertThat;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;

import com.google.common.io.Resources;

public final class TestUtils {
    public static final String ACCOUNT_PATH = "/v1/testAccount";

    private TestUtils() {
        // Hide the constructor for a Utils class
    }

    public static SwiftProxy setupAndStartProxy() throws IOException {
        Properties properties = new Properties();
        try (InputStream is = Resources.asByteSource(Resources.getResource(
                "swiftproxy.conf")).openStream()) {
            properties.load(is);
        }
        SwiftProxy proxy = SwiftProxy.Builder.builder()
                .overrides(properties)
                .build();
        proxy.start();
        return proxy;
    }

    public static Response deleteContainer(WebTarget target, String container) {
        return target.path(ACCOUNT_PATH + "/" + container)
                .request().delete();
    }

    public static void createContainer(WebTarget target, String container) {
        Response resp = target.path(ACCOUNT_PATH + "/" + container)
                .request().post(null);
        assertThat(resp.getStatus()).isEqualTo(Response.Status.NO_CONTENT.getStatusCode());
    }
}
<commit_msg>fix compile error<commit_after>/*
 * Copyright (c) Bounce Storage, Inc. All rights reserved.
 * For more information, please see COPYRIGHT in the top-level directory.
 */

package com.bouncestorage.swiftproxy;

import static org.assertj.core.api.Assertions.assertThat;

import java.io.InputStream;
import java.util.Properties;

import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;

import com.google.common.io.Resources;

public final class TestUtils {
    public static final String ACCOUNT_PATH = "/v1/testAccount";

    private TestUtils() {
        // Hide the constructor for a Utils class
    }

    public static SwiftProxy setupAndStartProxy() throws Exception {
        Properties properties = new Properties();
        try (InputStream is = Resources.asByteSource(Resources.getResource(
                "swiftproxy.conf")).openStream()) {
            properties.load(is);
        }
        SwiftProxy proxy = SwiftProxy.Builder.builder()
                .overrides(properties)
                .build();
        proxy.start();
        return proxy;
    }

    public static Response deleteContainer(WebTarget target, String container) {
        return target.path(ACCOUNT_PATH + "/" + container)
                .request().delete();
    }

    public static void createContainer(WebTarget target, String container) {
        Response resp = target.path(ACCOUNT_PATH + "/" + container)
                .request().post(null);
        assertThat(resp.getStatus()).isEqualTo(Response.Status.NO_CONTENT.getStatusCode());
    }
}

{'fraction_non_alphanumeric': 0.10453964194373401, 'fraction_numerical': 0.0006393861892583121, 'mean_word_length': 2.829865361077111, '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': '7056753', 'n_tokens_mistral': 841, 'n_tokens_neox': 818, 'n_words': 206}