Calculating Garland Degree of String
You are completely over-doing it. Your algorithm will be O(n3) (I think) on the length of the input when you can do it more simply in O(n2).

Consider the following instead:


Start at the middle of the input.
While the substring starting from this index is not equal the substring beginning the start of the input with the same length, we increment the index.
Finally, we return the length of the final substring that matched.


Basically, the logic can be summed up by this drawing:

-------------
^^^^^^ ^^^^^^ matches or not?

// if no continue

-------------
^^^^^   ^^^^^ matches or not?

// if no continue

-------------
^^^^     ^^^^ matches or not?


You can see the logic.

Implemented in code, it would be the following:

private static int identifyGarlandDegree(String candidate) {
    int length = candidate.length();
    int index = length / 2;
    while (!candidate.substring(0, length - index).equals(candidate.substring(index))) {
        index++;
    }
    return length - index;
}


Note that we don't need to add a check on index: it won't go out of bounds since when index == length, it will exit normally (empty string being equal to another empty string).