Schedule builder now uses Sets instead of Lists and has a larger set of sanity check unit tests.

 * fixed compilation error in Java application.