Program: 166015
Project: 166015
Buggy source:
static void setupWeightedRandomList(Configuration cfg,DimletMapping mapping){
  float rarity0=(float)cfg.get(KnownDimletConfiguration.CATEGORY_RARITY,"String_Node_Str",500.0f).getDouble();
  float rarity1=(float)cfg.get(KnownDimletConfiguration.CATEGORY_RARITY,"String_Node_Str",250.0f).getDouble();
  float rarity2=(float)cfg.get(KnownDimletConfiguration.CATEGORY_RARITY,"String_Node_Str",150.0f).getDouble();
  float rarity3=(float)cfg.get(KnownDimletConfiguration.CATEGORY_RARITY,"String_Node_Str",90.0f).getDouble();
  float rarity4=(float)cfg.get(KnownDimletConfiguration.CATEGORY_RARITY,"String_Node_Str",40.0f).getDouble();
  float rarity5=(float)cfg.get(KnownDimletConfiguration.CATEGORY_RARITY,"String_Node_Str",20.0f).getDouble();
  float rarity6=(float)cfg.get(KnownDimletConfiguration.CATEGORY_RARITY,"String_Node_Str",1.0f).getDouble();
  randomDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomMaterialDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomMaterialDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomLiquidDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomLiquidDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomMobDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomMobDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomStructureDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomStructureDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomEffectDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomEffectDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomFeatureDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomFeatureDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  for (  Map.Entry<DimletKey,DimletEntry> entry : KnownDimletConfiguration.idToDimletEntry.entrySet()) {
    randomDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
    DimletKey key=entry.getValue().getKey();
    if (key.getType() == DimletType.DIMLET_MATERIAL) {
      if (DimletObjectMapping.idToBlock.get(key) != null) {
        randomMaterialDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (key.getType() == DimletType.DIMLET_LIQUID) {
      if (DimletObjectMapping.idToFluid.get(key) != null) {
        randomLiquidDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (key.getType() == DimletType.DIMLET_MOBS) {
      MobDescriptor descriptor=DimletObjectMapping.idtoMob.get(key);
      if (descriptor != null && descriptor.getEntityClass() != null) {
        randomMobDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (key.getType() == DimletType.DIMLET_EFFECT) {
      if (DimletObjectMapping.idToEffectType.get(key) != EffectType.EFFECT_NONE) {
        randomEffectDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (key.getType() == DimletType.DIMLET_FEATURE) {
      if (DimletObjectMapping.idToFeatureType.get(key) != FeatureType.FEATURE_NONE) {
        randomFeatureDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (key.getType() == DimletType.DIMLET_STRUCTURE) {
      if (DimletObjectMapping.idToStructureType.get(key) != StructureType.STRUCTURE_NONE) {
        randomStructureDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
  }
}

Fixed version (ground truth):
static void setupWeightedRandomList(){
  randomDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomMaterialDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomMaterialDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomLiquidDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomLiquidDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomMobDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomMobDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomStructureDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomStructureDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomEffectDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomEffectDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomFeatureDimlets=new WeightedRandomSelector<Integer,DimletKey>();
  setupRarity(randomFeatureDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  for (  Map.Entry<DimletKey,DimletEntry> entry : KnownDimletConfiguration.idToDimletEntry.entrySet()) {
    randomDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
    DimletKey key=entry.getValue().getKey();
    if (key.getType() == DimletType.DIMLET_MATERIAL) {
      if (DimletObjectMapping.idToBlock.get(key) != null) {
        randomMaterialDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (key.getType() == DimletType.DIMLET_LIQUID) {
      if (DimletObjectMapping.idToFluid.get(key) != null) {
        randomLiquidDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (key.getType() == DimletType.DIMLET_MOBS) {
      MobDescriptor descriptor=DimletObjectMapping.idtoMob.get(key);
      if (descriptor != null && descriptor.getEntityClass() != null) {
        randomMobDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (key.getType() == DimletType.DIMLET_EFFECT) {
      if (DimletObjectMapping.idToEffectType.get(key) != EffectType.EFFECT_NONE) {
        randomEffectDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (key.getType() == DimletType.DIMLET_FEATURE) {
      if (DimletObjectMapping.idToFeatureType.get(key) != FeatureType.FEATURE_NONE) {
        randomFeatureDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (key.getType() == DimletType.DIMLET_STRUCTURE) {
      if (DimletObjectMapping.idToStructureType.get(key) != StructureType.STRUCTURE_NONE) {
        randomStructureDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
  }
}