/*
(non-Javadoc)

@see
mtas.codec.util.DataCollector.MtasDataItemFull#getDistribution(java.lang.
String)
4381
@Override
  protected HashMap<String, Object> getDistribution(String argument) {
    HashMap<String, Object> result = new LinkedHashMap<>();
    Long start = null;
    Long end = null;
    Long step = null;
    Integer number = null;
    if (argument != null) {
      Matcher m = fpArgument.matcher(argument);
      // get settings
      while (m.find()) {
        if (m.group(1).trim().equals("start")) {
          start = Long.parseLong(m.group(2));
        } else if (m.group(1).trim().equals("end")) {
          end = Long.parseLong(m.group(2));
        } else if (m.group(1).trim().equals("step")) {
          step = Long.parseLong(m.group(2));
        } else if (m.group(1).trim().equals("number")) {
          number = Integer.parseInt(m.group(2));
        }
      }
    }
    // always exactly one of (positive) number and (positive) step, other null
    if ((number == null || number < 1) && (step == null || step < 1)) {
      number = 10;
      step = null;
    } else if (step != null && step < 1) {
      step = null;
    } else if (number != null && number < 1) {
      number = null;
    } else if (step != null) {
      number = null;
    }
    // sanity checks start/end
    createStats();
    long tmpStart = Double.valueOf(Math.floor(stats.getMin())).longValue();
    long tmpEnd = Double.valueOf(Math.ceil(stats.getMax())).longValue();
    if (start != null && end != null && start > end) {
      return null;
    } else if (start != null && start > tmpEnd) {
      return null;
    } else if (end != null && end < tmpStart) {
      return null;
    }
    // check start and end
    if (start == null && end == null) {
      if (step == null) {
        step = -Math.floorDiv((tmpStart - tmpEnd - 1), number);
      }
      number = Long.valueOf(-Math.floorDiv((tmpStart - tmpEnd - 1), step))
          .intValue();
      start = tmpStart;
      end = start + (number * step);
    } else if (start == null) {
      if (step == null) {
        step = -Math.floorDiv((tmpStart - end - 1), number);
      }
      number = Long.valueOf(-Math.floorDiv((tmpStart - end - 1), step))
          .intValue();
      start = end - (number * step);
    } else if (end == null) {
      if (step == null) {
        step = -Math.floorDiv((start - tmpEnd - 1), number);
      }
      number = Long.valueOf(-Math.floorDiv((start - tmpEnd - 1), step))
          .intValue();
      end = start + (number * step);
    } else {
      if (step == null) {
        step = -Math.floorDiv((start - end - 1), number);
      }
      number = Long.valueOf(-Math.floorDiv((start - end - 1), step)).intValue();
    }
    long[] list = new long[number];
    for (Long v : fullValues) {
      if (v >= start && v <= end) {
        int i = Long.valueOf(Math.floorDiv((v - start), step)).intValue();
        list[i]++;
      }
    }
    for (int i = 0; i < number; i++) {
      Long l = start + i * step;
      Long r = Math.min(end, l + step - 1);
      String key;
      if (step > 1 && r > l) {
        key = "[" + l + "," + r + "]";
      } else {
        key = "[" + l + "]";
      }
      result.put(key, list[i]);
    }
    return result;
  }
393385
public MessageDataDesc getMessageDataDesc(String strParam)
    {
        if (strParam == null)
            return this;
        if (strParam.equals(this.getKey()))
            return this;
        if (m_messageDataDescChildren == null)
        {
            m_messageDataDescChildren = new HashMap<String,MessageDataDesc>();
            this.setupMessageDataDesc();
        }
        return (MessageDataDesc)m_messageDataDescChildren.get(strParam);
    }
482947
public DistributionPoint[] getDistributionPoints()
    {
        DistributionPoint[]    dp = new DistributionPoint[seq.size()];

        for (int i = 0; i != seq.size(); i++)
        {
            dp[i] = DistributionPoint.getInstance(seq.getObjectAt(i));
        }

        return dp;
    }
593614
@Override
    public org.fcrepo.server.types.gen.MIMETypedStream getDatastreamDissemination(String pid,
                                                                                  String dsID,
                                                                                  String asOfDateTime) {
        MessageContext ctx = context.getMessageContext();
        Context context = ReadOnlyContext.getSoapContext(ctx);
        assertInitialized();
        try {
            org.fcrepo.server.storage.types.MIMETypedStream mimeTypedStream =
                    m_access.getDatastreamDissemination(context,
                                                        pid,
                                                        dsID,
                                                        DateUtility
                                                                .parseDateOrNull(asOfDateTime));
            org.fcrepo.server.types.gen.MIMETypedStream genMIMETypedStream =
                    TypeUtility
                            .convertMIMETypedStreamToGenMIMETypedStream(mimeTypedStream);
            return genMIMETypedStream;
        } catch (OutOfMemoryError oome) {
            LOG.error("Out of memory error getting " + dsID
                    + " datastream dissemination for " + pid);
            String exceptionText =
                    "The datastream you are attempting to retrieve is too large "
                            + "to transfer via getDatastreamDissemination (as determined "
                            + "by the server memory allocation.) Consider retrieving this "
                            + "datastream via REST at: ";
            String restURL =
                    describeRepository().getRepositoryBaseURL() + "/get/" + pid
                            + "/" + dsID;
            throw CXFUtility.getFault(new Exception(exceptionText + restURL));

        } catch (Throwable th) {
            LOG.error("Error getting datastream dissemination", th);
            throw CXFUtility.getFault(th);
        }
    }
734675
protected DistributionSummary getExistingDistribution(String bucketName) {

        List<DistributionSummary> dists = getAllExistingWebDistributions(bucketName);
        if (dists.isEmpty()) {
            return null;
        } else {
            return dists.get(0);
        }
    }
117197
public LocalDistribution getDistribution(WrapperConfiguration configuration) {
                String baseName = getDistName(configuration.getDistribution());
                String distName = removeExtension(baseName);
                String rootDirName = rootDirName(distName, configuration);

                String distDirPathName = configuration.getDistributionPath() + "/" + rootDirName;
                File distDir = new File(getBaseDir(configuration.getDistributionBase()), distDirPathName);

                String distZipFilename = configuration.getZipPath() + "/" + rootDirName + "/" + baseName;
                File distZip = new File(getBaseDir(configuration.getZipBase()), distZipFilename);

                return new LocalDistribution(distDir, distZip);
        }
582411
@Override
    public java.util.List<DataSlice> getData() throws PersistentDataEncodingException, SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getData");

        java.util.List<DataSlice> retval = null;

        synchronized (this)
        {
            if (_link != null)
            {
                retval = _link.getMemberData();
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getData", "return=" + retval);
        return retval;
    }
1259032
public static AssociativeArray normalDistributionGetParams(FlatDataCollection flatDataCollection) {
        AssociativeArray params = new AssociativeArray();
        params.put("mean", Descriptives.mean(flatDataCollection));
        params.put("variance", Descriptives.variance(flatDataCollection, true));
        return params;
    }
882868
public String getDataString() {
        if (exception == null) {
            try {
                if (!setDataString) {
                    dataString = EntityUtils.toString(httpEntity, charset.charset);
                    setDataString = true;
                }
            } catch (IOException e) {
                e.printStackTrace();
                return null;
            }
        }

        return dataString;
    }
1296814
public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult
      getDeltaPresenceEstimationResult() {
    if (resultCase_ == 9) {
      return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult)
          result_;
    }
    return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult
        .getDefaultInstance();
  }
1255781
public com.google.api.ads.adwords.axis.v201809.cm.String_StringMapEntry[] getDisplayValue() {
        return displayValue;
    }
900728
public Long getValue(Meter.Type meterType) {
        if (meterType == Meter.Type.DISTRIBUTION_SUMMARY) {
            return getDistributionSummaryValue();
        }
        if (meterType == Meter.Type.TIMER) {
            return getTimerValue();
        }
        return null;
    }
89792
func GetClassDistribution(inst FixedDataGrid) map[string]int {
	ret := make(map[string]int)
	_, rows := inst.Size()
	for i := 0; i < rows; i++ {
		cls := GetClass(inst, i)
		ret[cls]++
	}
	return ret
}
677471
@Override
  public MtasDataItemNumberComparator<Double> getCompareValue1() {
    switch (sortType) {
    case CodecUtil.STATS_TYPE_SUM:
      return new MtasDataItemNumberComparator<Double>(valueSum, sortDirection);
    default:
      return null;
    }
  }
934571
@Override
  protected HashMap<String, Object> getDistribution(String argument) {
    HashMap<String, Object> result = new LinkedHashMap<>();
    Double start = null;
    Double end = null;
    Double step = null;
    Integer d = null;
    Integer number = null;
    if (argument != null) {
      Matcher m = fpArgument.matcher(argument);
      // get settings
      while (m.find()) {
        if (m.group(1).trim().equals("start")) {
          start = Double.parseDouble(m.group(2));
          d = (d == null) ? getNumberOfDecimals(m.group(2))
              : Math.max(d, getNumberOfDecimals(m.group(2)));
        } else if (m.group(1).trim().equals("end")) {
          end = Double.parseDouble(m.group(2));
          d = (d == null) ? getNumberOfDecimals(m.group(2))
              : Math.max(d, getNumberOfDecimals(m.group(2)));
        } else if (m.group(1).trim().equals("step")) {
          step = Double.parseDouble(m.group(2));
          d = (d == null) ? getNumberOfDecimals(m.group(2))
              : Math.max(d, getNumberOfDecimals(m.group(2)));
        } else if (m.group(1).trim().equals("number")) {
          number = Integer.parseInt(m.group(2));
        }
      }
    }
    // always exactly one of (positive) number and (positive) step, other null
    if ((number == null || number < 1) && (step == null || step <= 0)) {
      number = 10;
      step = null;
    } else if (step != null && step <= 0) {
      step = null;
    } else if (number != null && number < 1) {
      number = null;
    } else if (step != null) {
      number = null;
    }
    // sanity checks start/end
    createStats();
    double tmpStart = stats.getMin();
    double tmpEnd = stats.getMax();
    if (start != null && end != null && start > end) {
      return null;
    } else if (start != null && start > tmpEnd) {
      return null;
    } else if (end != null && end < tmpStart) {
      return null;
    }
    // check start and end
    if (start == null && end == null) {
      if (step == null) {
        step = (tmpEnd - tmpStart) / number;
      }
      number = Double.valueOf(Math.ceil((tmpEnd - tmpStart) / step)).intValue();
      start = tmpStart;
      end = start + (number * step);
    } else if (start == null) {
      if (step == null) {
        step = (end - tmpStart) / number;
      }
      number = Double.valueOf(Math.ceil((end - tmpStart) / step)).intValue();
      start = end - (number * step);
    } else if (end == null) {
      if (step == null) {
        step = (tmpEnd - start) / number;
      }
      number = Double.valueOf(Math.ceil((tmpEnd - start) / step)).intValue();
      end = start + (number * step);
    } else {
      if (step == null) {
        step = (end - start) / number;
      }
      number = Double.valueOf(Math.ceil((end - start) / step)).intValue();
    }
    // round step to agreeable format and recompute number
    int tmpD = Double.valueOf(Math.max(0, 1 + Math.ceil(-1 * Math.log10(step))))
        .intValue();
    d = (d == null) ? tmpD : Math.max(d, tmpD);
    double tmp = Math.pow(10.0, d);
    step = Math.round(step * tmp) / tmp;
    number = Double.valueOf(Math.ceil((end - start) / step)).intValue();

    // compute distribution
    long[] list = new long[number];
    for (Double v : fullValues) {
      if (v >= start && v <= end) {
        int i = Math.min(
            Double.valueOf(Math.floor((v - start) / step)).intValue(),
            (number - 1));
        list[i]++;
      }
    }
    Double l;
    Double r;
    String ls;
    String lsFormat;
    String rs;
    String rsFormat;
    for (int i = 0; i < number; i++) {
      l = start + i * step;
      r = Math.min(end, l + step);
      lsFormat = "%." + d + "f";
      ls = String.format(lsFormat, l);
      rsFormat = "%." + d + "f";
      rs = String.format(rsFormat, r);
      String key = "[" + ls + "," + rs
          + ((i == (number - 1) && r >= tmpEnd && l <= tmpEnd) ? "]" : ")");
      result.put(key, list[i]);
    }
    return result;
  }
1233004
public static Specification<JpaTarget> hasInstalledOrAssignedDistributionSet(@NotNull final Long distributionId) {
        return (targetRoot, query, cb) -> cb.or(
                cb.equal(targetRoot.get(JpaTarget_.installedDistributionSet).get(JpaDistributionSet_.id),
                        distributionId),
                cb.equal(targetRoot.<JpaDistributionSet> get(JpaTarget_.assignedDistributionSet)
                        .get(JpaDistributionSet_.id), distributionId));
    }
406273
public Discriminator getDiscriminator() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "getDiscriminator should not be called in UDPChannel");
        }
        return null;
    }