Buggy code:
public class DescriptiveStatistics implements Serializable , StatisticalSummary { private static final long serialVersionUID = 4133067267405273064L ; protected int windowSize = DescriptiveStatistics . INFINITE_WINDOW ; protected ResizableDoubleArray eDA = new ResizableDoubleArray ( ) ; private UnivariateStatistic meanImpl = new Mean ( ) ; private UnivariateStatistic geometricMeanImpl = new GeometricMean ( ) ; private UnivariateStatistic kurtosisImpl = new Kurtosis ( ) ; private UnivariateStatistic maxImpl = new Max ( ) ; private UnivariateStatistic minImpl = new Min ( ) ; private UnivariateStatistic percentileImpl = new Percentile ( ) ; private UnivariateStatistic skewnessImpl = new Skewness ( ) ; private UnivariateStatistic varianceImpl = new Variance ( ) ; private UnivariateStatistic sumsqImpl = new SumOfSquares ( ) ; private UnivariateStatistic sumImpl = new Sum ( ) ; public DescriptiveStatistics ( ) { } public DescriptiveStatistics ( int window ) { } public DescriptiveStatistics ( DescriptiveStatistics original ) { } public static final int INFINITE_WINDOW = - 1 ; public void addValue ( double v ) { } public void removeMostRecentValue ( ) { } public double replaceMostRecentValue ( double v ) { } public double getMean ( ) { } public double getGeometricMean ( ) { } public double getVariance ( ) { } public double getStandardDeviation ( ) { } public double getSkewness ( ) { } public double getKurtosis ( ) { } public double getMax ( ) { } public double getMin ( ) { } public long getN ( ) { } public double getSum ( ) { } public double getSumsq ( ) { } public void clear ( ) { } public int getWindowSize ( ) { } public void setWindowSize ( int windowSize ) { } public double [ ] getValues ( ) { } public double [ ] getSortedValues ( ) { } public double getElement ( int index ) { } public double getPercentile ( double p ) { } public String toString ( ) { } public double apply ( UnivariateStatistic stat ) { <START_BUG> return stat . evaluate ( eDA . getValues ( ) , eDA . start ( ) , eDA . getNumElements ( ) ) ; <END_BUG> } public synchronized UnivariateStatistic getMeanImpl ( ) { } public synchronized void setMeanImpl ( UnivariateStatistic meanImpl ) { } public synchronized UnivariateStatistic getGeometricMeanImpl ( ) { } public synchronized void setGeometricMeanImpl ( UnivariateStatistic geometricMeanImpl ) { } public synchronized UnivariateStatistic getKurtosisImpl ( ) { } public synchronized void setKurtosisImpl ( UnivariateStatistic kurtosisImpl ) { } public synchronized UnivariateStatistic getMaxImpl ( ) { } public synchronized void setMaxImpl ( UnivariateStatistic maxImpl ) { } public synchronized UnivariateStatistic getMinImpl ( ) { } public synchronized void setMinImpl ( UnivariateStatistic minImpl ) { } public synchronized UnivariateStatistic getPercentileImpl ( ) { } public synchronized void setPercentileImpl ( UnivariateStatistic percentileImpl ) { } public synchronized UnivariateStatistic getSkewnessImpl ( ) { } public synchronized void setSkewnessImpl ( UnivariateStatistic skewnessImpl ) { } public synchronized UnivariateStatistic getVarianceImpl ( ) { } public synchronized void setVarianceImpl ( UnivariateStatistic varianceImpl ) { } public synchronized UnivariateStatistic getSumsqImpl ( ) { } public synchronized void setSumsqImpl ( UnivariateStatistic sumsqImpl ) { } public synchronized UnivariateStatistic getSumImpl ( ) { } public synchronized void setSumImpl ( UnivariateStatistic sumImpl ) { } public DescriptiveStatistics copy ( ) { } public static void copy ( DescriptiveStatistics source , DescriptiveStatistics dest ) { } }

Fix:
return stat . evaluate ( eDA . getInternalValues ( ) , eDA . start ( ) , eDA . getNumElements ( ) ) ;