<commit_before>package com.inmobi.messaging.consumer.audit;

import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class Tuple {
  final private String hostname;
  final private String tier;
  final private String cluster;
  final private Date timestamp;
  final private String topic;
  private Long sent = 0l, received = 0l, lost = 0l;
  private boolean isGroupBySet = false;
  private Map<LatencyColumns, Long> latencyCountMap;
  private GroupBy.Group group;

  public Tuple(String hostname, String tier, String cluster, Date timestamp,String topic) {
    this(hostname, tier, cluster, timestamp, topic, null, 0l);
  }

  public Tuple(String hostname, String tier, String cluster, Date timestamp,
               String topic, Map<LatencyColumns, Long> latencyCountMap,
               Long sent) {
    this.hostname = hostname;
    this.tier = tier;
    this.topic = topic;
    this.cluster = cluster;
    this.timestamp = timestamp;
    this.latencyCountMap = latencyCountMap;
    this.sent = sent;
    setReceived();
  }

  private void setReceived() {
    received = 0l;
    for (Map.Entry<LatencyColumns, Long> entry : latencyCountMap.entrySet()) {
      received += entry.getValue();
      if (LatencyColumns.getLatencyColumn(entry.getKey().getValue()) ==
          LatencyColumns.LOST)
        lost = entry.getValue();
    }
  }

  @Override
  public int hashCode() {
    int result = hostname != null ? hostname.hashCode() : 0;
    result = 31 * result + (tier != null ? tier.hashCode() : 0);
    result = 31 * result + (cluster != null ? cluster.hashCode() : 0);
    result = 31 * result + (timestamp != null ? timestamp.hashCode() : 0);
    result = 31 * result + (topic != null ? topic.hashCode() : 0);
    return result;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    Tuple tuple = (Tuple) o;

    if (cluster != null ? !cluster.equals(tuple.cluster) :<commit_msg>Changing check condn in Tuple for setting lost count<commit_after>package com.inmobi.messaging.consumer.audit;

import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class Tuple {
  final private String hostname;
  final private String tier;
  final private String cluster;
  final private Date timestamp;
  final private String topic;
  private Long sent = 0l, received = 0l, lost = 0l;
  private boolean isGroupBySet = false;
  private Map<LatencyColumns, Long> latencyCountMap;
  private GroupBy.Group group;

  public Tuple(String hostname, String tier, String cluster, Date timestamp,String topic) {
    this(hostname, tier, cluster, timestamp, topic, null, 0l);
  }

  public Tuple(String hostname, String tier, String cluster, Date timestamp,
               String topic, Map<LatencyColumns, Long> latencyCountMap,
               Long sent) {
    this.hostname = hostname;
    this.tier = tier;
    this.topic = topic;
    this.cluster = cluster;
    this.timestamp = timestamp;
    this.latencyCountMap = latencyCountMap;
    this.sent = sent;
    setReceived();
  }

  private void setReceived() {
    received = 0l;
    for (Map.Entry<LatencyColumns, Long> entry : latencyCountMap.entrySet()) {
      received += entry.getValue();
      if (entry.getKey() == LatencyColumns.C600)
        lost = entry.getValue();
    }
  }

  @Override
  public int hashCode() {
    int result = hostname != null ? hostname.hashCode() : 0;
    result = 31 * result + (tier != null ? tier.hashCode() : 0);
    result = 31 * result + (cluster != null ? cluster.hashCode() : 0);
    result = 31 * result + (timestamp != null ? timestamp.hashCode() : 0);
    result = 31 * result + (topic != null ? topic.hashCode() : 0);
    return result;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    Tuple tuple = (Tuple) o;

    if (cluster != null ? !cluster.equals(tuple.cluster) :
{'fraction_non_alphanumeric': 0.11761846901579587, 'fraction_numerical': 0.009477521263669502, 'mean_word_length': 3.111888111888112, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6819889', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1222, 'n_words': 372}