<commit_before>
package org.dasein.cloud.google;

import java.util.logging.Handler;
import java.util.logging.LogRecord;

import org.apache.log4j.Logger;

import com.google.api.client.http.HttpTransport;

public class LogHandler {
    private static java.util.logging.Logger logger;
    private LogHandler() { }

    static public void verifyInitialized() {

        if (null == logger) {
            final Logger wire = getWireLogger(HttpTransport.class);
            if (wire.isDebugEnabled()) {
                logger = java.util.logging.Logger.getLogger(HttpTransport.class.getName());
                logger.setLevel(java.util.logging.Level.CONFIG);
                logger.addHandler(new Handler() {
                    @Override public void publish( LogRecord record ) {
                        String msg = record.getMessage();
                        if (msg.startsWith("-------------- REQUEST")) {
                            String [] lines = msg.split("[\n\r]+");
                            for (String line : lines)
                                if ((line.contains("https")) || (line.contains("Content-Length")))
                                    wire.debug("--> REQUEST: " + line);
                        } else if (msg.startsWith("{"))
                            wire.debug(msg);
                        else if (msg.startsWith("Total"))
                            wire.debug("<-- RESPONSE: " + record.getMessage());
                    }
                    @Override public void flush() {}
                    @Override public void close() throws SecurityException {}
                });
            }
        }

    }

    private static Logger getWireLogger(Class<HttpTransport> class1) {
        // TODO Auto-generated method stub
        return null;
    }
}<commit_msg>fixes NPE due to an accidentally created default method.<commit_after>
package org.dasein.cloud.google;

import java.util.logging.Handler;
import java.util.logging.LogRecord;

import javax.annotation.Nonnull;
import org.apache.log4j.Logger;

import com.google.api.client.http.HttpTransport;

public class LogHandler {
    private static java.util.logging.Logger logger;
    private LogHandler() { }

    static public void verifyInitialized() {

        if (null == logger) {
            final Logger wire = getWireLogger(HttpTransport.class);
            if (wire.isDebugEnabled()) {
                logger = java.util.logging.Logger.getLogger(HttpTransport.class.getName());
                logger.setLevel(java.util.logging.Level.CONFIG);
                logger.addHandler(new Handler() {
                    @Override public void publish( LogRecord record ) {
                        String msg = record.getMessage();
                        if (msg.startsWith("-------------- REQUEST")) {
                            String [] lines = msg.split("[\n\r]+");
                            for (String line : lines)
                                if ((line.contains("https")) || (line.contains("Content-Length")))
                                    wire.debug("--> REQUEST: " + line);
                        } else if (msg.startsWith("{"))
                            wire.debug(msg);
                        else if (msg.startsWith("Total"))
                            wire.debug("<-- RESPONSE: " + record.getMessage());
                    }
                    @Override public void flush() {}
                    @Override public void close() throws SecurityException {}
                });
            }
        }

    }

    static private @Nonnull String getLastItem(@Nonnull String name) {
        int idx = name.lastIndexOf('.');

        if( idx < 0 ) {
            return name;
        }
        else if( idx == (name.length()-1) ) {
            return "";
        }
        return name.substring(idx + 1);
    }

    static public @Nonnull Logger getWireLogger(@Nonnull Class<?> cls) {
        return Logger.getLogger("dasein.cloud.google.wire." + getLastItem(cls.getPackage().getName()) + "." + getLastItem(cls.getName()));
    }
}
{'fraction_non_alphanumeric': 0.12558714462299134, 'fraction_numerical': 0.0014833127317676143, 'mean_word_length': 1.5770700636942676, 'pattern_counts': {'":': 0, '<': 8, '<?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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6811589', 'n_tokens_mistral': 1020, 'n_tokens_neox': 984, 'n_words': 221}