// Pick the module with the most imports.
// In the event of a tie, pick the later one, as it will tend to depend on earlier ones.
int maxImportedModules = 0;
for (int i = 0; i < nModules; i++) {
MetaModule nthMetaModule = workspace.getNthMetaModule(i);
int nImportedModules = nthMetaModule.getNImportedModules();
if (nImportedModules >= maxImportedModules) {
maxImportedModules = nImportedModules;
workingModuleName = nthMetaModule.getName();
}
}
}
return workingModuleName;