k-mer error correction algorithm (java implementation)