Document getPatternInfo().
Use ArrayList instead a native array to avoid warnings.
Use for each loop.
Use parameterized comparator.

This should eliminate all known compiler warnings.