<commit_before>package org.jvnet.hudson.test;

import hudson.remoting.Which;
import hudson.FilePath;

import java.io.File;
import java.io.IOException;
import java.io.FileOutputStream;
import java.net.URL;

/**
 * Ensures that <tt>hudson.war</tt> is exploded.
 *
 * @author <NAME>
 */
final class WarExploder {
    public static final File EXPLODE_DIR = explode();

    /**
     * Explodes a war, if necesasry, and returns its root dir.
     */
    private static File explode() {
        try {
            // locate hudson.war
            URL winstone = WarExploder.class.getResource("/winstone.jar");
            if(winstone==null)
            // impossible, since the test harness pulls in hudson.war
                throw new AssertionError("hudson.war is not in the classpath.");
            File war = Which.jarFile(Class.forName("executable.Executable"));

            File explodeDir = new File("./target/hudson-for-test");
            File timestamp = new File(explodeDir,".timestamp");

            if(!timestamp.exists() || (timestamp.lastModified()==war.lastModified())) {
                System.out.println("Picking up hudson.war at "+war);
                new FilePath(explodeDir).deleteRecursive();
                new FilePath(war).unzip(new FilePath(explodeDir));
                new FileOutputStream(timestamp).close();
                timestamp.setLastModified(war.lastModified());
            } else {
                System.out.println("Picking up existing exploded hudson.war");
            }

            return explodeDir;
        } catch (IOException e) {
            throw new Error(e);
        } catch (InterruptedException e) {
            throw new Error(e);
        } catch (ClassNotFoundException e) {
            throw new Error(e);
        }
    }
}<commit_msg>improving diagnostics message<commit_after>package org.jvnet.hudson.test;

import hudson.remoting.Which;
import hudson.FilePath;

import java.io.File;
import java.io.IOException;
import java.io.FileOutputStream;
import java.net.URL;

/**
 * Ensures that <tt>hudson.war</tt> is exploded.
 *
 * @author <NAME>
 */
final class WarExploder {
    public static final File EXPLODE_DIR = explode();

    /**
     * Explodes a war, if necesasry, and returns its root dir.
     */
    private static File explode() {
        try {
            // locate hudson.war
            URL winstone = WarExploder.class.getResource("/winstone.jar");
            if(winstone==null)
            // impossible, since the test harness pulls in hudson.war
                throw new AssertionError("hudson.war is not in the classpath.");
            File war = Which.jarFile(Class.forName("executable.Executable"));

            File explodeDir = new File("./target/hudson-for-test");
            File timestamp = new File(explodeDir,".timestamp");

            if(!timestamp.exists() || (timestamp.lastModified()==war.lastModified())) {
                System.out.println("Exploding hudson.war at "+war);
                new FilePath(explodeDir).deleteRecursive();
                new FilePath(war).unzip(new FilePath(explodeDir));
                new FileOutputStream(timestamp).close();
                timestamp.setLastModified(war.lastModified());
            } else {
                System.out.println("Picking up existing exploded hudson.war at "+explodeDir.getAbsolutePath());
            }

            return explodeDir;
        } catch (IOException e) {
            throw new Error(e);
        } catch (InterruptedException e) {
            throw new Error(e);
        } catch (ClassNotFoundException e) {
            throw new Error(e);
        }
    }
}
{'fraction_non_alphanumeric': 0.11612548156301596, 'fraction_numerical': 0.0, 'mean_word_length': 2.208296557811121, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2557732', 'n_tokens_mistral': 1037, 'n_tokens_neox': 976, 'n_words': 241}