<commit_before>package org.ambraproject.rhino.view.journal;

import com.google.common.base.Preconditions;

/**
 * Simple view for {@link org.ambraproject.models.Volume}'s non-associative fields.
 */
public class VolumeNonAssocView {

  private final String volumeUri;
  private final String displayName;
  private final String imageUri;
  private final String title;
  private final String description;

  public VolumeNonAssocView(String volumeUri,
                            String displayName,
                            String imageUri,
                            String title,
                            String description) {
    this.volumeUri = volumeUri;
    this.displayName = displayName;
    this.imageUri = imageUri;
    this.title = title;
    this.description = description;
  }

  /**
   * Convenience method for building from a SELECT'ed array of query results.
   */
  public static VolumeNonAssocView fromArray(Object[] array) {
    Preconditions.checkArgument(array.length == 5);
    return new VolumeNonAssocView(
        (String) array[0], (String) array[1], (String) array[2], (String) array[3], (String) array[4]);
  }

}<commit_msg>DPRO-131: Fix null pointer exception<commit_after>package org.ambraproject.rhino.view.journal;

import com.google.common.base.Preconditions;

/**
 * Simple view for {@link org.ambraproject.models.Volume}'s non-associative fields.
 */
public class VolumeNonAssocView {

  private final String volumeUri;
  private final String displayName;
  private final String imageUri;
  private final String title;
  private final String description;

  public VolumeNonAssocView(String volumeUri,
                            String displayName,
                            String imageUri,
                            String title,
                            String description) {
    this.volumeUri = volumeUri;
    this.displayName = displayName;
    this.imageUri = imageUri;
    this.title = title;
    this.description = description;
  }

  /**
   * Convenience method for building from a SELECT'ed array of query results.
   */
  public static VolumeNonAssocView fromArray(Object[] array) {
    if (array == null) {
      return null;
    }
    Preconditions.checkArgument(array.length == 5);
    return new VolumeNonAssocView(
        (String) array[0], (String) array[1], (String) array[2], (String) array[3], (String) array[4]);
  }

}
{'fraction_non_alphanumeric': 0.09235269536147096, 'fraction_numerical': 0.0062682824905975765, 'mean_word_length': 2.6944444444444446, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6891315', 'n_tokens_mistral': 662, 'n_tokens_neox': 644, 'n_words': 181}