final List<String> packageIds = StringUtil.split((String) parameters.get(MetadataConstants.PACKAGE_IDS), "|");
final List<String> versions = StringUtil.split((String) parameters.get(MetadataConstants.VERSIONS), "|");
final List<String> versionConstraints = StringUtil.split((String) parameters.get(MetadataConstants.VERSION_CONSTRAINTS), "|");
final Set<String> targetFrameworks = new HashSet<>(StringUtil.split((String) parameters.get(MetadataConstants.TARGET_FRAMEWORKS), "|"));
final boolean includePrerelease = (Boolean) parameters.get(MetadataConstants.INCLUDE_PRERELEASE);
<BUG>final boolean includeAllVersions = (Boolean) parameters.get(MetadataConstants.INCLUDE_ALL_VERSIONS);
final List<NuGetIndexEntry> result = new ArrayList<>();
</BUG>
for (int i = 0; i < packageIds.size(); i++) {
final String requestedPackageId = packageIds.get(i);

final List<String> packageIds = StringUtil.split((String) parameters.get(MetadataConstants.PACKAGE_IDS), "|");
final List<String> versions = StringUtil.split((String) parameters.get(MetadataConstants.VERSIONS), "|");
final List<String> versionConstraints = StringUtil.split((String) parameters.get(MetadataConstants.VERSION_CONSTRAINTS), "|");
final Set<String> targetFrameworks = new HashSet<>(StringUtil.split((String) parameters.get(MetadataConstants.TARGET_FRAMEWORKS), "|"));
final boolean includePrerelease = (Boolean) parameters.get(MetadataConstants.INCLUDE_PRERELEASE);
final boolean includeAllVersions = (Boolean) parameters.get(MetadataConstants.INCLUDE_ALL_VERSIONS);
if (packageIds.size() != versions.size() || !versionConstraints.isEmpty() && packageIds.size() != versionConstraints.size()) {
return Collections.emptyList();
}
final List<NuGetIndexEntry> packages = new ArrayList<>();
for (int i = 0; i < packageIds.size(); i++) {
final String requestedPackageId = packageIds.get(i);
