// Path: src/main/java/com/github/s3curitybug/similarityuniformfuzzyhash/ToStringUtils.java
// protected static final int BLOCK_BASE = 36;
// 
// Path: src/main/java/com/github/s3curitybug/similarityuniformfuzzyhash/ToStringUtils.java
// public static final String BLOCK_INNER_SEPARATOR = "/";
// 
// Path: src/main/java/com/github/s3curitybug/similarityuniformfuzzyhash/ToStringUtils.java
// protected static final int BLOCK_MAX_CHARS =
//         2 * BLOCK_INT_MAX_CHARS + BLOCK_INNER_SEPARATOR.length();
// 
// Path: src/main/java/com/github/s3curitybug/similarityuniformfuzzyhash/UniformFuzzyHash.java
// protected static final int BLOCK_HASH_MODULO = Integer.MAX_VALUE;


import static com.github.s3curitybug.similarityuniformfuzzyhash.ToStringUtils.BLOCK_BASE;
import static com.github.s3curitybug.similarityuniformfuzzyhash.ToStringUtils.BLOCK_INNER_SEPARATOR;
import static com.github.s3curitybug.similarityuniformfuzzyhash.ToStringUtils.BLOCK_MAX_CHARS;
import static com.github.s3curitybug.similarityuniformfuzzyhash.UniformFuzzyHash.BLOCK_HASH_MODULO;


        // Uniform Fuzzy Hash Block.
        UniformFuzzyHashBlock block = new UniformFuzzyHashBlock();

        // Split block hash from block size.
        int splitIndex = blockString.lastIndexOf(BLOCK_INNER_SEPARATOR);

        if (splitIndex < 0) {
            throw new IllegalArgumentException(String.format(
                    "Block string does not fit the format blockHash%sblockSize.",
                    BLOCK_INNER_SEPARATOR));
        }

        // Block hash.
        String blockHashString = blockString.substring(0, splitIndex);

        if (blockHashString.isEmpty()) {
            throw new IllegalArgumentException(String.format(
                    "Block string does not fit the format blockHash%sblockSize.",
                    BLOCK_INNER_SEPARATOR));
        }

        try {
            block.blockHash = Integer.parseInt(blockHashString, BLOCK_BASE);
        } catch (NumberFormatException numberFormatException) {
            throw new IllegalArgumentException(String.format(
                    "Block hash (%s) is not parseable.",
                    blockHashString));
        }


// Path: src/main/java/com/github/s3curitybug/similarityuniformfuzzyhash/ToStringUtils.java
// protected static final int BLOCK_BASE = 36;
// 
// Path: src/main/java/com/github/s3curitybug/similarityuniformfuzzyhash/ToStringUtils.java
// public static final String BLOCK_INNER_SEPARATOR = "/";
// 
// Path: src/main/java/com/github/s3curitybug/similarityuniformfuzzyhash/ToStringUtils.java
// protected static final int BLOCK_MAX_CHARS =
//         2 * BLOCK_INT_MAX_CHARS + BLOCK_INNER_SEPARATOR.length();
// 
// Path: src/main/java/com/github/s3curitybug/similarityuniformfuzzyhash/UniformFuzzyHash.java
// protected static final int BLOCK_HASH_MODULO = Integer.MAX_VALUE;


// Path: src/main/java/com/github/s3curitybug/similarityuniformfuzzyhash/UniformFuzzyHashBlock.java
import static com.github.s3curitybug.similarityuniformfuzzyhash.ToStringUtils.BLOCK_BASE;
import static com.github.s3curitybug.similarityuniformfuzzyhash.ToStringUtils.BLOCK_INNER_SEPARATOR;
import static com.github.s3curitybug.similarityuniformfuzzyhash.ToStringUtils.BLOCK_MAX_CHARS;
import static com.github.s3curitybug.similarityuniformfuzzyhash.UniformFuzzyHash.BLOCK_HASH_MODULO;


        // Uniform Fuzzy Hash Block.
        UniformFuzzyHashBlock block = new UniformFuzzyHashBlock();

        // Split block hash from block size.
        int splitIndex = blockString.lastIndexOf(BLOCK_INNER_SEPARATOR);

        if (splitIndex < 0) {
            throw new IllegalArgumentException(String.format(
                    "Block string does not fit the format blockHash%sblockSize.",
                    BLOCK_INNER_SEPARATOR));
        }

        // Block hash.
        String blockHashString = blockString.substring(0, splitIndex);

        if (blockHashString.isEmpty()) {
            throw new IllegalArgumentException(String.format(
                    "Block string does not fit the format blockHash%sblockSize.",
                    BLOCK_INNER_SEPARATOR));
        }

        try {
            block.blockHash = Integer.parseInt(blockHashString, BLOCK_BASE);
        } catch (NumberFormatException numberFormatException) {
            throw new IllegalArgumentException(String.format(
                    "Block hash (%s) is not parseable.",
                    blockHashString));
        }


        if (block.blockHash < 0 || block.blockHash >= BLOCK_HASH_MODULO) {
