int weight = generateUniformRandomInt(1, weights.get(weights.size() - 1), randomNumberStream);
<BUG>return getSpecificValue(weight, values, weights);
</BUG>
}
<BUG>protected static <T> T getSpecificValue(int weight, List<T> values, List<Integer> weights)
</BUG>
{
checkArgument(values.size() == weights.size());
for (int index = 0; index < weights.size(); index++) {
if (weight <= weights.get(index)) {

int weight = generateUniformRandomInt(1, weights.get(weights.size() - 1), randomNumberStream);
return getValueForWeight(weight, values, weights);
}
protected static <T> T getValueForWeight(int weight, List<T> values, List<Integer> weights)
{
checkArgument(values.size() == weights.size());
for (int index = 0; index < weights.size(); index++) {
if (weight <= weights.get(index)) {
