private static void sortIndeces(final List<RawJarInfo> jarNames, final List<PackageInfo> packageNames,
final List<RawClassInfo> classNames) throws Exception {
JavaUtils.printToConsole("Sorting indeces ...");
RawClassInfoComparator rawClassInfoComparator = new RawClassInfoComparator();
Collections.sort(jarNames);
Collections.sort(packageNames);
Collections.sort(classNames, rawClassInfoComparator);
JavaUtils.printToConsole("Calculating index information ...");
int classListLength = classNames.size();
for (int i = 0; i < classListLength; i++) {
RawClassInfo classInfo = classNames.get(i);
int j = i + 1;
while ((j < classListLength) && (0 == rawClassInfoComparator.compare(classInfo, classNames.get(j)))) {
RawClassInfo classInfoToMerge = classNames.get(j);
for (int k = 0; k < classInfoToMerge.jarInfoList.size(); k++) {
if (-1 == classInfo.jarInfoList.indexOf(classInfoToMerge.jarInfoList.get(k))) {
classInfo.jarInfoList.add(classInfoToMerge.jarInfoList.get(k));
}