<commit_before>package de.mxro.maven.tools;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

import org.apache.commons.codec.binary.Hex;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.IOUtils;

public class WriteHashes {

    public static void forFile(final Path baseFile) throws Exception {
        writeMd5(baseFile);
        writeSh1(baseFile);
    }

    public static String getMd5ForFile(final File file) {
        String value = null;
        FileInputStream inputStream = null;
        try {
            inputStream = new FileInputStream(file);
            org.bouncycastle.util.encoders.Hex.encode(arg0)
            value = DigestUtils.md5Hex(IOUtils.toByteArray(inputStream));
        } catch (final IOException e) {
            throw new RuntimeException(e);
        } finally {
            IOUtils.closeQuietly(inputStream);
        }
        return value;
    }

    public static void writeMd5(final Path baseFile) throws NoSuchAlgorithmException, IOException {

        final Path md5File = baseFile.getFileSystem().getPath(baseFile.toString() + ".md5");

        Files.write(md5File, getMd5ForFile(baseFile.toFile()).getBytes("UTF-8"));

        final byte[] md5 = MessageDigest.getInstance("MD5").digest(Files.readAllBytes(baseFile));

        final Path md5File = baseFile.getFileSystem().getPath(baseFile.toString() + ".md5");

        Files.write(md5File, hexString.toString().getBytes("UTF-8"));

    }

    public static void writeSh1(final Path baseFile) throws NoSuchAlgorithmException, IOException {

        final byte[] sha1 = MessageDigest.getInstance("SHA-1").digest(Files.readAllBytes(baseFile));

        final Path sha1File = baseFile.getFileSystem().getPath(baseFile.toString() + ".sh1");

        Files.write(sha1File, sha1);
    }
}<commit_msg>Updating checksums Autocommit Mon Aug 15 19:14:39 AEST 2016<commit_after>package de.mxro.maven.tools;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

import org.apache.commons.codec.binary.Hex;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.IOUtils;

public class WriteHashes {

    public static void forFile(final Path baseFile) throws Exception {
        writeMd5(baseFile);
        writeSh1(baseFile);
    }

    public static String getMd5ForFile(final File file) {
        String value = null;
        FileInputStream inputStream = null;
        try {
            inputStream = new FileInputStream(file);
            org.bouncycastle.util.encoders.Hex.encode(arg0)
            value = DigestUtils.md5Hex(IOUtils.toByteArray(inputStream));
        } catch (final IOException e) {
            throw new RuntimeException(e);
        } finally {
            IOUtils.closeQuietly(inputStream);
        }
        return value;
    }

    public static void writeMd5(final Path baseFile) throws NoSuchAlgorithmException, IOException {

        final Path md5File = baseFile.getFileSystem().getPath(baseFile.toString() + ".md5");

        Files.write(md5File, getMd5ForFile(baseFile.toFile()).getBytes("UTF-8"));

        final MessageDigest messageDigest = MessageDigest.getInstance("MD5");
        messageDigest.reset();
        messageDigest.update(Files.readAllBytes(baseFile), offset, len);
        final byte[] md5 = messageDigest.digest();

        final Path md5File = baseFile.getFileSystem().getPath(baseFile.toString() + ".md5");

        Files.write(md5File, Hex.encode());

    }

    public static void writeSh1(final Path baseFile) throws NoSuchAlgorithmException, IOException {

        final byte[] sha1 = MessageDigest.getInstance("SHA-1").digest(Files.readAllBytes(baseFile));

        final Path sha1File = baseFile.getFileSystem().getPath(baseFile.toString() + ".sh1");

        Files.write(sha1File, sha1);
    }
}
{'fraction_non_alphanumeric': 0.11000726920281076, 'fraction_numerical': 0.014296098861158226, 'mean_word_length': 3.3636363636363638, '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': '1080211', 'n_tokens_mistral': 1238, 'n_tokens_neox': 1202, 'n_words': 240}