<commit_before>// Copyright 2011 The MOE Authors All Rights Reserved.

package com.google.devtools.moe.client.repositories;

import com.google.common.base.Joiner;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;

import org.joda.time.DateTime;

import java.util.List;

import javax.annotation.Nullable;

/**
 * Holds the metadata associated with a Revision.
 *
 */
public class RevisionMetadata {
  public final String id;
  public final String author;
  public final DateTime date;
  public final String description;
  public final List<Revision> parents;

  public RevisionMetadata(String id, String author, DateTime date,
                          String description, List<Revision> parents) {
    this.id = id;
    this.author = author;
    this.date = Preconditions.checkNotNull(date);
    this.description = description;
    this.parents = parents;
  }

  @Override
  public int hashCode() {
    return Objects.hashCode(id, author, date, description, parents);
  }

  @Override
  public boolean equals(Object obj) {
    if (obj instanceof RevisionMetadata) {
      RevisionMetadata revisionMetadataObj = (RevisionMetadata) obj;
      return (Objects.equal(id, revisionMetadataObj.id) &&
              Objects.equal(author, revisionMetadataObj.author) &&
              date.isEqual(revisionMetadataObj.date) &&
              Objects.equal(description, revisionMetadataObj.description) &&
              Objects.equal(parents, revisionMetadataObj.parents));
    }<commit_msg>capture author information from [] correctly 	Change on 2012/07/20 by nicksantos <<EMAIL>> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=32090873<commit_after>// Copyright 2011 The MOE Authors All Rights Reserved.

package com.google.devtools.moe.client.repositories;

import com.google.common.base.Joiner;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;

import org.joda.time.DateTime;

import java.util.List;

import javax.annotation.Nullable;

/**
 * Holds the metadata associated with a Revision.
 *
 */
public class RevisionMetadata {
  public final String id;

  /**
   * RevisionHistories should make a best-effort to format their author
   * information in the git canonical form, i.e.,
   * <NAME> <<EMAIL>>
   */
  public final String author;

  public final DateTime date;
  public final String description;
  public final List<Revision> parents;

  public RevisionMetadata(String id, String author, DateTime date,
                          String description, List<Revision> parents) {
    this.id = id;
    this.author = author;
    this.date = Preconditions.checkNotNull(date);
    this.description = description;
    this.parents = parents;
  }

  @Override
  public int hashCode() {
    return Objects.hashCode(id, author, date, description, parents);
  }

  @Override
  public boolean equals(Object obj) {
    if (obj instanceof RevisionMetadata) {
      RevisionMetadata revisionMetadataObj = (RevisionMetadata) obj;
      return (Objects.equal(id, revisionMetadataObj.id) &&
              Objects.equal(author, revisionMetadataObj.author) &&
              date.isEqual(revisionMetadataObj.date) &&
              Objects.equal(description, revisionMetadataObj.description) &&
              Objects.equal(parents, revisionMetadataObj.parents));
    }
{'fraction_non_alphanumeric': 0.09915917657291969, 'fraction_numerical': 0.006958538706871557, 'mean_word_length': 3.4747081712062258, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '6542309', 'n_tokens_mistral': 977, 'n_tokens_neox': 931, 'n_words': 251}