<commit_before>package org.wildfly.swarm.undertow;

import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.Node;

/**
 * @author <NAME>
 */
public interface StaticContentContainer<T extends Archive<T>> extends Archive<T> {

    default T staticContent() {
        return staticContent( "/", "." );
    }

    default T staticContent(String context) {
        return staticContent( context, "." );
    }

    default T staticContent(String context, String base) {
        as(WARArchive.class).addModule("org.wildfly.swarm.undertow", "runtime");
        as(WARArchive.class).addAsServiceProvider("io.undertow.server.handlers.builder.HandlerBuilder", "org.wildfly.swarm.runtime.undertow.StaticHandlerBuilder");


        Node node = as(WARArchive.class).get("WEB-INF/undertow-handlers.conf");

        UndertowHandlersAsset asset = null;
        if ( node == null ) {
            asset = new UndertowHandlersAsset();
            as(WARArchive.class).add( asset, "WEB-INF/undertow-handlers.conf" );
        } else {
            asset = (UndertowHandlersAsset) node.getAsset();
        }

        asset.staticContent( context, base );

        return (T) this;
    }
}<commit_msg>Fix Undertow static handler package name, as it was renamed<commit_after>package org.wildfly.swarm.undertow;

import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.Node;

/**
 * @author <NAME>
 */
public interface StaticContentContainer<T extends Archive<T>> extends Archive<T> {

    default T staticContent() {
        return staticContent( "/", "." );
    }

    default T staticContent(String context) {
        return staticContent( context, "." );
    }

    default T staticContent(String context, String base) {
        as(WARArchive.class).addModule("org.wildfly.swarm.undertow", "runtime");
        as(WARArchive.class).addAsServiceProvider("io.undertow.server.handlers.builder.HandlerBuilder", "org.wildfly.swarm.undertow.runtime.StaticHandlerBuilder");

        Node node = as(WARArchive.class).get("WEB-INF/undertow-handlers.conf");

        UndertowHandlersAsset asset = null;
        if ( node == null ) {
            asset = new UndertowHandlersAsset();
            as(WARArchive.class).add( asset, "WEB-INF/undertow-handlers.conf" );
        } else {
            asset = (UndertowHandlersAsset) node.getAsset();
        }

        asset.staticContent( context, base );

        return (T) this;
    }
}
{'fraction_non_alphanumeric': 0.13039901275195392, 'fraction_numerical': 0.0, 'mean_word_length': 3.033167495854063, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '5399499', 'n_tokens_mistral': 780, 'n_tokens_neox': 714, 'n_words': 133}