<commit_before>package com.linkedin.thirdeye.anomaly.detection;

import com.google.common.collect.ListMultimap;
import com.linkedin.thirdeye.api.DimensionMap;
import com.linkedin.thirdeye.api.MetricTimeSeries;
import com.linkedin.thirdeye.datalayer.dto.MergedAnomalyResultDTO;
import com.linkedin.thirdeye.datalayer.dto.RawAnomalyResultDTO;
import com.linkedin.thirdeye.detector.metric.transfer.ScalingFactor;
import java.util.List;
import java.util.Map;

public class AnomalyDetectionInputContext {
  Map<DimensionMap, MetricTimeSeries> dimensionKeyMetricTimeSeriesMap;
  ListMultimap<DimensionMap, RawAnomalyResultDTO> existingRawAnomalies;
  ListMultimap<DimensionMap, MergedAnomalyResultDTO> knownMergedAnomalies;
  List<ScalingFactor> scalingFactors;

  public Map<DimensionMap, MetricTimeSeries> getDimensionKeyMetricTimeSeriesMap() {
    return dimensionKeyMetricTimeSeriesMap;
  }
<commit_msg>Fix null exceptin issue when updating merged anomalies (#1168)<commit_after>package com.linkedin.thirdeye.anomaly.detection;

import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ListMultimap;
import com.linkedin.thirdeye.api.DimensionMap;
import com.linkedin.thirdeye.api.MetricTimeSeries;
import com.linkedin.thirdeye.datalayer.dto.MergedAnomalyResultDTO;
import com.linkedin.thirdeye.datalayer.dto.RawAnomalyResultDTO;
import com.linkedin.thirdeye.detector.metric.transfer.ScalingFactor;
import java.util.Collections;
import java.util.List;
import java.util.Map;

public class AnomalyDetectionInputContext {
  Map<DimensionMap, MetricTimeSeries> dimensionKeyMetricTimeSeriesMap = Collections.emptyMap();
  ListMultimap<DimensionMap, RawAnomalyResultDTO> existingRawAnomalies = ArrayListMultimap.create();;
  ListMultimap<DimensionMap, MergedAnomalyResultDTO> knownMergedAnomalies = ArrayListMultimap.create();;
  List<ScalingFactor> scalingFactors = Collections.emptyList();

  public Map<DimensionMap, MetricTimeSeries> getDimensionKeyMetricTimeSeriesMap() {
    return dimensionKeyMetricTimeSeriesMap;
  }

{'fraction_non_alphanumeric': 0.08463796477495107, 'fraction_numerical': 0.0019569471624266144, 'mean_word_length': 8.170403587443946, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3147026', 'n_tokens_mistral': 665, 'n_tokens_neox': 664, 'n_words': 92}