<commit_before>package org.smoothbuild.vm.compute;

import static com.google.common.base.Preconditions.checkArgument;
import static java.util.Objects.requireNonNull;

import org.smoothbuild.vm.job.algorithm.Output;

public record Computed(Output output, Exception exception, ResSource resSource) {

  public Computed(Output output, ResSource resSource) {
    this(output, null, resSource);
  }

  public Computed(Exception exception, ResSource resSource) {
    this(null, exception, resSource);
  }

  public Computed(Output output, Exception exception, ResSource resSource) {
    this.output = output;
    this.exception = exception;
    this.resSource = requireNonNull(resSource);
    checkArgument(output == null ^ exception == null);
  }

  public boolean hasOutput() {
    return output != null;
  }

  public boolean hasOutputWithValue() {<commit_msg>refactored Computed<commit_after>package org.smoothbuild.vm.compute;

import static com.google.common.base.Preconditions.checkArgument;
import static java.util.Objects.requireNonNull;

import org.smoothbuild.vm.job.algorithm.Output;

public record Computed(Output output, Exception exception, ResSource resSource) {

  public Computed(Output output, ResSource resSource) {
    this(output, null, resSource);
  }

  public Computed(Exception exception, ResSource resSource) {
    this(null, exception, resSource);
  }

  public Computed(Output output, Exception exception, ResSource resSource) {
    this.output = output;
    this.exception = exception;
    this.resSource = requireNonNull(resSource);
    checkArgument((output == null) != (exception == null));
  }

  public boolean hasOutput() {
    return output != null;
  }

  public boolean hasOutputWithValue() {
{'fraction_non_alphanumeric': 0.09913043478260869, 'fraction_numerical': 0.0, 'mean_word_length': 4.753333333333333, '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': '5559478', 'n_tokens_mistral': 485, 'n_tokens_neox': 474, 'n_words': 121}