Creates a copy of this <code>JobStatus</code> with the progress set to
an indeterminant value (<code>Double.NaN</code>).
@return A copy of this <code>JobStatus</code> with the progress set to
indeterminant.
483126
public JobStatus withIndeterminantProgress() {
    return new JobStatus(jobId, description, state, Double.NaN, status, eventId);
  }
995801
def copy(self):
        
        stat_result = copy(self)
        stat_result.use_float = self.use_float
        return stat_result
557566
public JSONArray construct(){
        JSONArray ret = new JSONArray();
        ret.put(start.getMillis() / 1000);
        ret.put(end.getMillis() / 1000);
        ret.put(runtime);
        ret.put(area);
        ret.put(0);
        ret.put(completed ? 1 : 0);
        return ret;
    }
940354
private final SimpleOrderedMap<Object> createShardsOutput() {
    SimpleOrderedMap<Object> output = new SimpleOrderedMap<>();
    if (shardStageStatus != null && !shardStageStatus.isEmpty()) {
      List<SimpleOrderedMap<Object>> list = new ArrayList<>();
      for (StageStatus stageStatus : shardStageStatus.values()) {
        list.add(stageStatus.createOutput());
      }
      output.add(NAME_STATUS_STAGES, list);
    }
    if (shards != null && !shards.isEmpty()) {
      List<SimpleOrderedMap<Object>> list = new ArrayList<>();
      for (ShardStatus shardStatus : shards.values()) {
        list.add(shardStatus.createOutput());
      }
      output.add(NAME_STATUS_SHARDS, list);
    }
    return output;
  }
696023
public synchronized Object getNextJob()
    {
        Object strJobDef = null;
        synchronized (this)
        {
            if (gvJobs.size() > 0)
                strJobDef = gvJobs.remove(0);
        }
        return strJobDef;
    }
340665
public ProgressMonitor createProgressMonitor(String title) {
    ProgressState state = new ProgressState(title);
    states.add(state);
    return state;
  }
167995
@Override
	public JobStatus createJobStatus(long jobInstanceId) {
		logger.entering(CLASSNAME, "createJobStatus", jobInstanceId);
		Connection conn = null;
		PreparedStatement statement = null;
		JobStatus jobStatus = new JobStatus(jobInstanceId);
		try {
			conn = getConnection();
			statement = conn.prepareStatement("INSERT INTO jobstatus (id, obj) VALUES(?, ?)");
			statement.setLong(1, jobInstanceId);
			statement.setBytes(2, serializeObject(jobStatus));
			statement.executeUpdate();

		} catch (SQLException e) {
			throw new PersistenceException(e);
		} catch (IOException e) {
			throw new PersistenceException(e);
		} finally {
			cleanupConnection(conn, null, statement);
		}
		logger.exiting(CLASSNAME, "createJobStatus");
		return jobStatus;
	}
493759
public AreaOfInterest copy() {
        AreaOfInterest aoi = new AreaOfInterest();
        aoi.display = this.display;
        aoi.area = this.area;
        aoi.polygon = this.polygon;
        aoi.style = this.style;
        aoi.renderAsSvg = this.renderAsSvg;
        return aoi;
    }
66498
private Put getJobStatusPut() {
    Put pStatus = new Put(jobKeyBytes);
    byte[] valueBytes = Bytes.toBytes(this.jobStatus);
    byte[] qualifier = Bytes.toBytes(JobHistoryKeys.JOB_STATUS.toString().toLowerCase());
    pStatus.addColumn(Constants.INFO_FAM_BYTES, qualifier, valueBytes);
    return pStatus;
  }
704501
public static <T, C extends Comparable> FibonacciHeap<T, C> create() {
        return FibonacciHeap.create(Ordering.<C>natural());
    }
954703
public static TaxNumberMapSharedConstants create() {
    if (taxNumberMapConstants == null) { // NOPMD it's thread save!
      synchronized (TaxNumberMapConstants.class) {
        if (taxNumberMapConstants == null) {
          taxNumberMapConstants = GWT.create(TaxNumberMapConstants.class);
        }
      }
    }
    return taxNumberMapConstants;
  }
956410
public double getAverage() {
        readLock.lock();
        try {
            // any values at all, needed to avoid a DivideByZero exception
            if (this.values.size() <= 0) {
                return 0;
            }
            return ((double)this.total / (double)this.values.size());
        } finally {
            readLock.unlock();
        }
    }
446997
public RandomVariableInterface abs() {
		if(isDeterministic()) {
			double newValueIfNonStochastic = Math.abs(valueIfNonStochastic);
			return new RandomVariableLowMemory(time, newValueIfNonStochastic);
		}
		else {
			double[] newRealizations = new double[realizations.length];
			for(int i=0; i<newRealizations.length; i++) {
				newRealizations[i]		 = Math.abs(realizations[i]);
			}
			return new RandomVariableLowMemory(time, newRealizations);
		}
	}
417427
public static <T> T[][] copyOf(final T[][] nums) {
        final int lengthY = Array.getLength(nums);
        int lengthX = 0;
        if (Array.getLength(nums) > 0) {
            lengthX = Array.getLength(nums[0]);
        }
        @SuppressWarnings("unchecked")
        final T[][] copy = (T[][]) Array.newInstance(nums.getClass().getComponentType().getComponentType(), lengthY,
                lengthX);
        for (int i = 0; i < copy.length; i++) {
            @SuppressWarnings("unchecked")
            final T[] member = (T[]) Array.newInstance(nums[i].getClass().getComponentType(), nums[i].length);
            System.arraycopy(nums[i], 0, member, 0, nums[i].length);
            copy[i] = member;
        }
        return copy;
    }
567074
@Override
    public VoltTableRow cloneRow() {
        Row retval = new Row(m_position);
        retval.m_hasCalculatedOffsets = m_hasCalculatedOffsets;
        retval.m_wasNull = m_wasNull;
        if (m_offsets != null) {
            for (int i = 0; i < m_colCount; i++) {
                retval.m_offsets[i] = m_offsets[i];
            }
        }
        retval.m_activeRowIndex = m_activeRowIndex;
        return retval;
    }
227415
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;
  }
1247050
public static MatrixAccumulator mkMinAccumulator() {
        return new MatrixAccumulator() {
            private double result = Double.POSITIVE_INFINITY;

            @Override
            public void update(int i, int j, double value) {
                result = Math.min(result, value);
            }

            @Override
            public double accumulate() {
                double value = result;
                result = Double.POSITIVE_INFINITY;
                return value;
            }
        };
    }