Github user cestella commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/401#discussion_r93636499
  
    --- Diff: 
metron-analytics/metron-statistics/src/test/java/org/apache/metron/statistics/StellarStatisticsFunctionsTest.java
 ---
    @@ -373,15 +373,16 @@ public void statsBinRunner(List<Double> splits) 
throws Exception {
     
       public void statsBinRunner(List<Double> splits, String splitsName) 
throws Exception {
         int bin = 0;
    +    StatisticsProvider provider = 
(StatisticsProvider)variables.get("stats");
         for(Double d : stats.getSortedValues()) {
    -      StatisticsProvider provider = 
(StatisticsProvider)variables.get("stats");
           if(bin < splits.size()) {
             double percentileOfBin = provider.getPercentile(splits.get(bin));
             if (d > percentileOfBin) {
               //we aren't the right bin, so let's find the right one.
               // Keep in mind that this value could be more than one bin away 
from the last good bin.
    -          for(;bin < splits.size() && d > 
provider.getPercentile(splits.get(bin));bin++) {
    -
    +          while ( bin < splits.size()  &&  d > 
provider.getPercentile(splits.get(bin)) ) {
    +            //increment the bin number until it includes the target value, 
or we run out of bins
    +            bin++;
    --- End diff --
    
    Done


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to