public static int calcRLen(int diff){
  return (int)Math.round(1.5 * Math.log(rand.nextInt(diff + 1) + 1) + rand.nextInt(1));
}

public static int calcRLen ( int diff ) { return ( int ) Math . round ( 1.5 * Math . log ( rand . nextInt ( diff + 1 ) + 1 ) + rand . nextInt ( 1 ) ) ; }
calculate length of randomly generated char sequence .
