}
private void updateModels(final List<TemplateModel> templates, final List<WikiModel> wikis) {
updateModel(templates, this.templatesModel);
updateModel(wikis, this.wikisModel);
}
<BUG>private List<TemplateModel> buildTemplateModels(final Templates templates) {
final List<Template> templatesList = templates.getTemplates();
final List<TemplateModel> templateModels = new ArrayList<>(templatesList.size());
for (final Template template : templatesList) {
templateModels.add(new TemplateModel(template));
}
return templateModels;</BUG>
}

}
public void reload(final Templates templates, final Wikis wikis) {
updateModels(buildTemplateModels(templates), buildWikiModels(wikis));
}
private void updateModels(final List<TemplateModel> templates, final List<WikiModel> wikis) {
updateModel(templates, this.templatesModel);
updateModel(wikis, this.wikisModel);
}
private List<TemplateModel> buildTemplateModels(final Templates templates) {
return templates.getTemplates().parallelStream().map(TemplateModel::new).collect(Collectors.toList());
}
