Buggy code:
private static final int TEMPERING_MASK_B = - 1658038656 ; private static final int TEMPERING_MASK_C = - 272236544 ; private int [ ] mt ; private int mti ; private int [ ] mag01 ; private static final long GOOD_SEED = 4357 ; private double nextNextGaussian ; private boolean haveNextNextGaussian ; public static final MersenneTwisterFast DEFAULT_INSTANCE = new MersenneTwisterFast ( ) ; private static long seedAdditive_ = 0 ; private long initializationSeed ; public MersenneTwisterFast ( ) { } private MersenneTwisterFast ( long seed ) { } public final void setSeed ( long seed ) { } public final long getSeed ( ) { } public final int nextInt ( ) { } public final short nextShort ( ) { } public final char nextChar ( ) { } public final boolean nextBoolean ( ) { } public final byte nextByte ( ) { } public final void nextBytes ( byte [ ] bytes ) { } public final long nextLong ( ) { } public final double nextDouble ( ) { } public final double nextGaussian ( ) { } public final float nextFloat ( ) { } public int nextInt ( int n ) { } public final void permute ( int [ ] array ) { } public final void shuffle ( int [ ] array ) { } public final void shuffle ( int [ ] array , int numberOfShuffles ) { } public int [ ] shuffled ( int l ) { } public int [ ] permuted ( int l ) { } public double nextGamma ( double alpha , double lambda ) { double a = alpha ; double aa = - 1.0 ; double aaa = - 1.0 ; double b = 0.0 ; double c = 0.0 ; double d = 0.0 ; double e ; double r ; double s = 0.0 ; double si = 0.0 ; double ss = 0.0 ; double q0 = 0.0 ; double q1 = 0.0416666664 ; double q2 = 0.0208333723 ; double q3 = 0.0079849875 ; double q4 = 0.0015746717 ; double q5 = - 3.349403E-4 ; double q6 = 3.340332E-4 ; double q7 = 6.053049E-4 ; double q8 = - 4.701849E-4 ; double q9 = 1.71032E-4 ; double a1 = 0.333333333 ; double a2 = - 0.249999949 ; double a3 = 0.199999867 ; double a4 = - 0.166677482 ; double a5 = 0.142873973 ; double a6 = - 0.124385581 ; double a7 = 0.11036831 ; double a8 = - 0.112750886 ; double a9 = 0.104089866 ; double e1 = 1.0 ; double e2 = 0.499999994 ; double e3 = 0.166666848 ; double e4 = 0.041664508 ; double e5 = 0.008345522 ; double e6 = 0.001353826 ; double e7 = 2.47453E-4 ; double gds ; double p ; double q ; double t ; double sign_u ; double u ; double v ; double w ; double x ; double v1 ; double v2 ; double v12 ; if ( a <= 0.0 ) throw new IllegalArgumentException ( ) ; if ( lambda <= 0.0 ) <START_BUG> new IllegalArgumentException ( ) ; <END_BUG> if ( a < 1.0 ) { b = 1.0 + ( 0.36788794412 * a ) ; for ( ; ; ) { p = b * ( nextDouble ( ) ) ; if ( p <= 1.0 ) { gds = Math . exp ( ( ( Math . log ( p ) ) // a ) ) ; if ( ( Math . log ( nextDouble ( ) ) ) <= ( - gds ) ) return gds // lambda ; } else { gds = - ( Math . log ( ( ( b - p ) // a ) ) ) ; if ( ( Math . log ( nextDouble ( ) ) ) <= ( ( a - 1.0 ) * ( Math . log ( gds ) ) ) ) return gds // lambda ; } } } else { if ( a != aa ) { aa = a ; ss = a - 0.5 ; s = Math . sqrt ( ss ) ; d = 5.656854249 - ( 12.0 * s ) ; } do { v1 = ( 2.0 * ( nextDouble ( ) ) ) - 1.0 ; v2 = ( 2.0 * ( nextDouble ( ) ) ) - 1.0 ; v12 = ( v1 * v1 ) + ( v2 * v2 ) ; } while ( v12 > 1.0 ) ; t = v1 * ( Math . sqrt ( ( ( ( - 2.0 ) * ( Math . log ( v12 ) ) ) // v12 ) ) ) ; x = s + ( 0.5 * t ) ; gds = x * x ; if ( t >= 0.0 ) return gds // lambda ; u = nextDouble ( ) ; if ( ( d * u ) <= ( ( t * t ) * t ) ) return gds // lambda ; if ( a != aaa ) { aaa = a ; r = 1.0 // a ; q0 = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( q9 * r ) + q8 ) * r ) + q7 ) * r ) + q6 ) * r ) + q5 ) * r ) + q4 ) * r ) + q3 ) * r ) + q2 ) * r ) + q1 ) * r ; if ( a > 3.686 ) { if ( a > 13.022 ) { b = 1.77 ; si = 0.75 ; c = 0.1515 // s ; } else { b = 1.654 + ( 0.0076 * ss ) ; si = ( 1.68 // s ) + 0.275 ; c = ( 0.062 // s ) + 0.024 ; } }

Fix:
throw new IllegalArgumentException ( ) ;