if (dataPlatform != null && nativeName != null && dataOrigin != null) {
try {
List<Map<String, Object>> items =
DatasetInfoDao.getDatasetInventoryItems(dataPlatform, nativeName, dataOrigin, limit);
resultJson.put("return_code", 200);
<BUG>resultJson.set("dataset_inventory_items", Json.toJson(items));
</BUG>
} catch (EmptyResultDataAccessException e) {
<BUG>Logger.debug("DataAccessException nativeName: " + nativeName + " , dataOrigin: " + dataOrigin, e);</BUG>
resultJson.put("return_code", 404);
resultJson.put("error_message",
<BUG>"dataset inventory for " + nativeName + " at " + dataOrigin + " cannot be found!");
</BUG>
}

if (dataPlatform != null && nativeName != null && dataOrigin != null) {
try {
List<Map<String, Object>> items =
DatasetInfoDao.getDatasetInventoryItems(dataPlatform, nativeName, dataOrigin, limit);
resultJson.put("return_code", 200);
resultJson.set("datasetList", Json.toJson(items));
} catch (EmptyResultDataAccessException e) {
resultJson.put("return_code", 404);
resultJson.put("error_message",
"dataset inventory for " + dataPlatform + " - " + nativeName + " - " + dataOrigin + " cannot be found!");
}
