DistributionGraph#drawSample needs the values in sorted order, so it made sense (originally) for the values to be a pair of numbers that could be sorted. However, the code now uses the StatCalculator (via SamplingStatCalculator) which by design must use a sorted TreeMap in order to be able to calculate percentiles easily. It would be easy for the StatCalculator to return the keys and values as some kind of ordered list or array; or indeed just use the entrySet as is, rather than creating a (larger) copy of the entrySet as an unsorted HashMap. DistributionGraph could in fact use StatCalculator directly. Whether this is worthwhile fixing is another matter: is the Graph actually useful?
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2912