Buggy code:
public class Vec extends Keyed < Vec > { public final long [ ] _espc ; private String [ ] _domain ; public final String [ ] domain ( ) { } public final String factor ( long i ) { } public final void setDomain ( String [ ] domain ) { } public final int cardinality ( ) { } public static final byte T_BAD = 0 ; public static final byte T_UUID = 1 ; public static final byte T_STR = 2 ; public static final byte T_NUM = 3 ; public static final byte T_ENUM = 4 ; public static final byte T_TIME = 5 ; public static final byte T_TIMELAST = ( ( byte ) ( ( Vec . T_TIME ) + ( TIME_PARSE . length ) ) ) ; byte _type ; static final String [ ] TYPE_STR = new String [ ] { "BAD" , "UUID" , "string" , "numeric" , "enum" , "time" , "time" , "time" } ; public final boolean isEnum ( ) { } public final boolean isUUID ( ) { } public final boolean isString ( ) { } public final boolean isNumeric ( ) { } public final boolean isTime ( ) { } public Vec ( Key < Vec > key , long [ ] espc ) { } Vec ( Key < Vec > key , long [ ] espc , String [ ] domain ) { } public Vec ( Key < Vec > key , long [ ] espc , String [ ] domain , byte type ) { } public long length ( ) { } public int nChunks ( ) { } long chunk2StartElem ( int cidx ) { } private int chunkLen ( int cidx ) { } boolean checkCompatible ( Vec v ) { } boolean readable ( ) { } boolean writable ( ) { } public long [ ] get_espc ( ) { } public byte get_type ( ) { } public String get_type_str ( ) { } public boolean isBinary ( ) { } public static Vec makeZero ( long len ) { } public static Vec makeCon ( double x , long len ) { } public static Vec makeCon ( double x , long len , int log_rows_per_chunk ) { } public Vec makeZero ( ) { } public Vec makeZero ( String [ ] domain ) { } public Vec makeCopy ( ) { } private static Vec makeCon ( final long l , String [ ] domain , Vec . VectorGroup group , long [ ] espc ) { } public static Vec makeVec ( double [ ] vals , Key < Vec > vecKey ) { } public Vec makeCon ( final double d ) { } private static Vec makeCon ( final double d , Vec . VectorGroup group , long [ ] espc ) { } public Vec [ ] makeZeros ( int n ) { } public Vec [ ] makeZeros ( int n , String [ ] [ ] domain , byte [ ] types ) { } public Vec [ ] makeCons ( int n , final long l , String [ ] [ ] domains , byte [ ] types ) { } public static Vec makeSeq ( long len ) { } public static Vec makeSeq ( final long min , long len ) { } public static Vec makeRepSeq ( long len , final long repeat ) { } public Vec makeRand ( final long seed ) { Vec randVec = makeZero ( ) ; new MRTask ( ) { @ Override public void map ( Chunk c ) { <START_BUG> java . util . Random rng = new java . util . Random ( ( seed * ( c . cidx ( ) ) ) ) ; <END_BUG> for ( int i = 0 ; i < ( c . _len ) ; ++ i ) c . set ( i , rng . nextFloat ( ) ) ; } } . doAll ( randVec ) ; return randVec ; } public double min ( ) { } public double [ ] mins ( ) { } public double max ( ) { } public double [ ] maxs ( ) { } public final boolean isConst ( ) { } public final boolean isBad ( ) { } public double mean ( ) { } public double sigma ( ) { } public long naCnt ( ) { } public long nzCnt ( ) { } public long pinfs ( ) { } public long ninfs ( ) { } public boolean isInt ( ) { } public long byteSize ( ) { } public static final double [ ] PERCENTILES = new double [ ] { 0.001 , 0.01 , 0.1 , 0.25 , 1.0 // 3.0 , 0.5 , 2.0 // 3.0 , 0.75 , 0.9 , 0.99 , 0.999 } ; public long [ ] bins ( ) { } public long [ ] lazy_bins ( ) { } public double base ( ) { } public double stride ( ) { } public double [ ] pctiles ( ) { } private RollupStats rollupStats ( ) { } public void startRollupStats ( Futures fs ) { } public void startRollupStats ( Futures fs , boolean doHisto ) { } @ Override protected long checksum_impl ( ) { } public void preWriting ( ) { } public Futures postWrite ( Futures fs ) { } int elem2ChunkIdx ( long i ) { } public static Key getVecKey ( Key chk_key ) { } public Key chunkKey ( int cidx ) { } public static Key chunkKey ( Key veckey , int cidx ) { } Key rollupStatsKey ( ) { } Value chunkIdx ( int cidx ) { } private boolean checkMissing ( int cidx , Value val ) { }

Fix:
java . util . Random rng = new java . util . Random ( ( seed * ( ( c . cidx ( ) ) + 1 ) ) ) ;