Buggy code:
@ RunWith ( RetryRunner . class ) public class CMAESOptimizerTest { static final int DIM = 13 ; static final int LAMBDA = 4 + ( ( int ) ( 3.0 * ( Math . log ( CMAESOptimizerTest . DIM ) ) ) ) ; @ Test ( expected = OutOfRangeException . class ) public void testInitOutofbounds ( ) { } @ Test ( expected = MultiDimensionMismatchException . class ) public void testBoundariesDimensionMismatch ( ) { } @ Test ( expected = NoDataException . class ) public void testBoundariesNoData ( ) { } @ Test ( expected = NotPositiveException . class ) public void testInputSigmaNegative ( ) { } @ Test ( expected = OutOfRangeException . class ) public void testInputSigmaOutOfRange ( ) { double [ ] startPoint = CMAESOptimizerTest . point ( CMAESOptimizerTest . DIM , 0.5 ) ; double [ ] insigma = CMAESOptimizerTest . point ( CMAESOptimizerTest . DIM , 1.1 ) ; <START_BUG> double [ ] [ ] boundaries = CMAESOptimizerTest . boundaries ( CMAESOptimizerTest . DIM , ( - 1 ) , 2 ) ; <END_BUG> RealPointValuePair expected = new RealPointValuePair ( CMAESOptimizerTest . point ( CMAESOptimizerTest . DIM , 1.0 ) , 0.0 ) ; doTest ( new CMAESOptimizerTest . Rosen ( ) , startPoint , insigma , boundaries , MINIMIZE , CMAESOptimizerTest . LAMBDA , true , 0 , 1.0E-13 , 1.0E-13 , 1.0E-6 , 100000 , expected ) ; } @ Test ( expected = MultiDimensionMismatchException . class ) public void testInputSigmaDimensionMismatch ( ) { } @ Test @ Retry ( 3 ) public void testRosen ( ) { } @ Test @ Retry ( 3 ) public void testMaximize ( ) { } @ Test public void testEllipse ( ) { } @ Test public void testElliRotated ( ) { } @ Test public void testCigar ( ) { } @ Test public void testTwoAxes ( ) { } @ Test public void testCigTab ( ) { } @ Test public void testSphere ( ) { } @ Test public void testTablet ( ) { } @ Test public void testDiffPow ( ) { } @ Test public void testSsDiffPow ( ) { } @ Test public void testAckley ( ) { } @ Test public void testRastrigin ( ) { } @ Test public void testConstrainedRosen ( ) { } @ Test public void testDiagonalRosen ( ) { } private void doTest ( MultivariateRealFunction func , double [ ] startPoint , double [ ] inSigma , double [ ] [ ] boundaries , GoalType goal , int lambda , boolean isActive , int diagonalOnly , double stopValue , double fTol , double pointTol , int maxEvaluations , RealPointValuePair expected ) { } private static double [ ] point ( int n , double value ) { } private static double [ ] [ ] boundaries ( int dim , double lower , double upper ) { } private static class Sphere implements MultivariateRealFunction { public double value ( double [ ] x ) { } } private static class Cigar implements MultivariateRealFunction { private double factor ; Cigar ( ) { } Cigar ( double axisratio ) { } public double value ( double [ ] x ) { } } private static class Tablet implements MultivariateRealFunction { private double factor ; Tablet ( ) { } Tablet ( double axisratio ) { } public double value ( double [ ] x ) { } } private static class CigTab implements MultivariateRealFunction { private double factor ; CigTab ( ) { } CigTab ( double axisratio ) { } public double value ( double [ ] x ) { } } private static class TwoAxes implements MultivariateRealFunction { private double factor ; TwoAxes ( ) { } TwoAxes ( double axisratio ) { } public double value ( double [ ] x ) { } } private static class ElliRotated implements MultivariateRealFunction { private CMAESOptimizerTest . Basis B = new CMAESOptimizerTest . Basis ( ) ; private double factor ; ElliRotated ( ) { } ElliRotated ( double axisratio ) { } public double value ( double [ ] x ) { } } private static class Elli implements MultivariateRealFunction { private double factor ; Elli ( ) { } Elli ( double axisratio ) { } public double value ( double [ ] x ) { } } private static class MinusElli implements MultivariateRealFunction { public double value ( double [ ] x ) { } } private static class DiffPow implements MultivariateRealFunction { public double value ( double [ ] x ) { } } private static class SsDiffPow implements MultivariateRealFunction { public double value ( double [ ] x ) { } } private static class Rosen implements MultivariateRealFunction { public double value ( double [ ] x ) { } } private static class Ackley implements MultivariateRealFunction { private double axisratio ; Ackley ( double axra ) { } public Ackley ( ) { } public double value ( double [ ] x ) { } } private static class Rastrigin implements MultivariateRealFunction { private double axisratio ; private double amplitude ; Rastrigin ( ) { } Rastrigin ( double axisratio , double amplitude ) { } public double value ( double [ ] x ) { } } private static class Basis { double [ ] [ ] basis ; Random rand = new Random ( 2 ) ; double [ ] Rotate ( double [ ] x ) { } void GenBasis ( int DIM ) { } } }

Fix:
double [ ] [ ] boundaries = CMAESOptimizerTest . boundaries ( CMAESOptimizerTest . DIM , ( - 0.5 ) , 0.5 ) ;