import java.util.Random;

class BadRandomInt {

	static Random r = new Random();

	// FIXME: We should recommend use of nextInt here instead
	int nextInt(int n) {
		return (int) (r.nextDouble() * n);
	}
	
	// FIXME: We should generate a warning here about single-use random number generates
	static int randomInt(int n) {
		Random ran = new Random();  
		return  ran.nextInt(n);
	}
}

@@ -197,16 +197,266 @@
 n);%0A%09%7D%0A%09
+%0A%0A%09int nextInt() %7B%0A%09%09return (int) (r.nextDouble() * 100);%0A%09%7D%0A%09%0A%0A%09// FIXME: We should recommend use of nextInt here instead%0A%09int nextInt2(int n) %7B%0A%09%09return (int) (n * r.nextDouble());%0A%09%7D%0A%09%0A%0A%09int nextInt2() %7B%0A%09%09return (int) (100 * r.nextDouble());%0A%09%7D%0A%09
 %0A%09// FIX

add more test cases