Pairwise Test Algorithm (java version, originated from QICT)