code: public static AssociativeArray getRanksFromValues(FlatDataList flatDataCollection) {
          AssociativeArray tiesCounter = new AssociativeArray();
          Map<Object, Double> key2AvgRank = new LinkedHashMap<>();
          _buildRankArrays(flatDataCollection, tiesCounter, key2AvgRank);
          int i = 0;
          for (Object value : flatDataCollection) {
              flatDataCollection.set(i++, key2AvgRank.get(value));
          }
          return tiesCounter;
      }
docs: Replaces the actual values of the flatDataCollection with their ranks and
  returns in the tieCounter the keys that occur more than once and the
  number of occurrences. The tieCounter does not store the list and ranks
  of the actual ties because we never use them.
  
  @param flatDataCollection
  @return