code: public DatasetState newDatasetState(boolean fullCopy) {
      DatasetState datasetState = new DatasetState(this.jobName, this.jobId);
      datasetState.setStartTime(this.startTime);
      datasetState.setEndTime(this.endTime);
      datasetState.setDuration(this.duration);
      if (fullCopy) {
        datasetState.setState(this.state);
        datasetState.setTaskCount(this.taskCount);
        datasetState.addTaskStates(this.taskStates.values());
        datasetState.addSkippedTaskStates(this.skippedTaskStates.values());
      }
      return datasetState;
    }
docs: Create a new {@link JobState.DatasetState} based on this {@link JobState} instance.
  
  @param fullCopy whether to do a full copy of this {@link JobState} instance
  @return a new {@link JobState.DatasetState} object