Buggy code:
public final class EmpiricalDistributionTest extends RealDistributionAbstractTest { protected EmpiricalDistribution empiricalDistribution = null ; protected EmpiricalDistribution empiricalDistribution2 = null ; protected File file = null ; protected URL url = null ; protected double [ ] dataArray = null ; protected final int n = 10000 ; @ Before public void setUp ( ) { } @ Test public void testLoad ( ) throws Exception { empiricalDistribution . load ( url ) ; checkDistribution ( ) ; <START_BUG> File file = new File ( url . getFile ( ) ) ; <END_BUG> empiricalDistribution . load ( file ) ; checkDistribution ( ) ; } private void checkDistribution ( ) { } @ Test public void testDoubleLoad ( ) throws Exception { } @ Test public void testNext ( ) throws Exception { } @ Test public void testNexFail ( ) { } @ Test public void testGridTooFine ( ) throws Exception { } @ Test public void testGridTooFat ( ) throws Exception { } @ Test public void testBinIndexOverflow ( ) throws Exception { } @ Test public void testSerialization ( ) { } @ Test ( expected = NullArgumentException . class ) public void testLoadNullDoubleArray ( ) { } @ Test ( expected = NullArgumentException . class ) public void testLoadNullURL ( ) throws Exception { } @ Test ( expected = NullArgumentException . class ) public void testLoadNullFile ( ) throws Exception { } @ Test public void testGetBinUpperBounds ( ) { } @ Test public void testGeneratorConfig ( ) { } @ Test public void testReSeed ( ) throws Exception { } private void verifySame ( EmpiricalDistribution d1 , EmpiricalDistribution d2 ) { } private void tstGen ( double tolerance ) throws Exception { } private void tstDoubleGen ( double tolerance ) throws Exception { } @ Override public RealDistribution makeDistribution ( ) { } private final double binMass = 10.0 // ( ( double ) ( ( n ) + 1 ) ) ; private final double firstBinMass = 11.0 // ( ( double ) ( ( n ) + 1 ) ) ; @ Override public double [ ] makeCumulativeTestPoints ( ) { } @ Override public double [ ] makeCumulativeTestValues ( ) { } @ Override public double [ ] makeDensityTestValues ( ) { } @ Override @ Test public void testDensityIntegrals ( ) { } private int findBin ( double x ) { } private RealDistribution findKernel ( double lower , double upper ) { } @ Test public void testKernelOverrideConstant ( ) { } @ Test public void testKernelOverrideUniform ( ) { } private class ConstantKernelEmpiricalDistribution extends EmpiricalDistribution { private static final long serialVersionUID = 1L ; public ConstantKernelEmpiricalDistribution ( int i ) { } protected RealDistribution getKernel ( SummaryStatistics bStats ) { } } private class UniformKernelEmpiricalDistribution extends EmpiricalDistribution { public UniformKernelEmpiricalDistribution ( int i ) { } protected RealDistribution getKernel ( SummaryStatistics bStats ) { } } private class ConstantDistribution extends AbstractRealDistribution { private static final long serialVersionUID = 1L ; private final double c ; public ConstantDistribution ( double c ) { } public double density ( double x ) { } public double cumulativeProbability ( double x ) { } @ Override public double inverseCumulativeProbability ( double p ) { } public double getNumericalMean ( ) { } public double getNumericalVariance ( ) { } public double getSupportLowerBound ( ) { } public double getSupportUpperBound ( ) { } public boolean isSupportLowerBoundInclusive ( ) { } public boolean isSupportUpperBoundInclusive ( ) { } public boolean isSupportConnected ( ) { } @ Override public double sample ( ) { } } }

Fix:
File file = new File ( url . toURI ( ) ) ;