String theRepositoryName = theRepositoryList.getSelectedItem().toString();
if (theCachedRepositories.containsKey(theRepositoryName)) {
theSelectedRepository = theCachedRepositories.get(theRepositoryName);
} else {
if (theRepositoryName.equals("Local Game Repository")) {
theSelectedRepository = new LocalGameRepository();
} else {
theSelectedRepository = new CloudGameRepository(theRepositoryName);
}
theCachedRepositories.put(theRepositoryName, theSelectedRepository);
}