Source:
protected Collection<MetricRawData> getAllRawData(List<MetricNameDto> metricNames) { Set<String> agentNames = new HashSet<String>(); Set<String> monitoringDescriptions = new HashSet<String>(); Set<String> sessionIds = new HashSet<String>(); Set<Long> taskIds = new HashSet<Long>(); for (MetricNameDto metricName : metricNames) { MonitoringIdUtils.MonitoringId monitoringId = splitMonitoringMetricId(metricName.getMetricName()); agentNames.add(monitoringId.getAgentName()); String description = newToOldMonitoringIds.get(monitoringId.getMonitoringName()); monitoringDescriptions.add(description == null ? monitoringId.getMonitoringName() : description); taskIds.addAll(metricName.getTaskIds()); sessionIds.addAll(metricName.getTest().getSessionIds()); } List<Object[]> rawDatas = getRawDataDbCall(sessionIds, taskIds, agentNames, monitoringDescriptions); if (rawDatas.isEmpty()) { log.warn("No plot data found for {}", metricNames); return Collections.emptyList(); } List<MetricRawData> result = new ArrayList<MetricRawData>(rawDatas.size()); for (Object[] raw : rawDatas) { MetricRawData metricRawData = new MetricRawData(); metricRawData.setTime(((Number) raw[2]).longValue()); metricRawData.setValue((Double) raw[3]); String monitoringName = (String) raw[0]; if (oldToNewMonitoringIds.containsKey(monitoringName)) { monitoringName = oldToNewMonitoringIds.get(monitoringName); } String agentName = raw[4] == null ? (String) raw[5] : (String) raw[4]; metricRawData.setMetricId(MonitoringIdUtils.getMonitoringMetricId(monitoringName, agentName)); metricRawData.setWorkloadTaskDataId(((Number) raw[6]).longValue()); metricRawData.setSessionId((String)raw[1]); result.add(metricRawData); } return result; }

Target:
protected Collection<MetricRawData> getAllRawData(List<MetricNameDto> metricNames) { Set<String> agentNames = new HashSet<String>(); Set<String> monitoringDescriptions = new HashSet<String>(); Set<String> sessionIds = new HashSet<String>(); Set<Long> taskIds = new HashSet<Long>(); for (MetricNameDto metricName : metricNames) { MonitoringIdUtils.MonitoringId monitoringId = splitMonitoringMetricId(metricName.getMetricName()); if(monitoringId == null) { log.error("Could not split metricName of to MonitoringId. Will skip.", metricName); continue; } agentNames.add(monitoringId.getAgentName()); String description = newToOldMonitoringIds.get(monitoringId.getMonitoringName()); monitoringDescriptions.add(description == null ? monitoringId.getMonitoringName() : description); taskIds.addAll(metricName.getTaskIds()); sessionIds.addAll(metricName.getTest().getSessionIds()); } List<Object[]> rawDatas = getRawDataDbCall(sessionIds, taskIds, agentNames, monitoringDescriptions); if (rawDatas.isEmpty()) { log.warn("No plot data found for {}", metricNames); return Collections.emptyList(); } List<MetricRawData> result = new ArrayList<MetricRawData>(rawDatas.size()); for (Object[] raw : rawDatas) { MetricRawData metricRawData = new MetricRawData(); metricRawData.setTime(((Number) raw[2]).longValue()); metricRawData.setValue((Double) raw[3]); String monitoringName = (String) raw[0]; if (oldToNewMonitoringIds.containsKey(monitoringName)) { monitoringName = oldToNewMonitoringIds.get(monitoringName); } String agentName = raw[4] == null ? (String) raw[5] : (String) raw[4]; metricRawData.setMetricId(MonitoringIdUtils.getMonitoringMetricId(monitoringName, agentName)); metricRawData.setWorkloadTaskDataId(((Number) raw[6]).longValue()); metricRawData.setSessionId((String)raw[1]); result.add(metricRawData); } return result; }