Program: 166091
Project: 166091
Buggy source:
static void setupWeightedRandomList(Configuration cfg){
  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,Integer>();
  setupRarity(randomDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomMaterialDimlets=new WeightedRandomSelector<Integer,Integer>();
  setupRarity(randomMaterialDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomLiquidDimlets=new WeightedRandomSelector<Integer,Integer>();
  setupRarity(randomLiquidDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomMobDimlets=new WeightedRandomSelector<Integer,Integer>();
  setupRarity(randomMobDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomEffectDimlets=new WeightedRandomSelector<Integer,Integer>();
  setupRarity(randomEffectDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomFeatureDimlets=new WeightedRandomSelector<Integer,Integer>();
  setupRarity(randomFeatureDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  for (  Map.Entry<Integer,DimletEntry> entry : KnownDimletConfiguration.idToDimlet.entrySet()) {
    randomDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
    if (entry.getValue().getKey().getType() == DimletType.DIMLET_MATERIAL) {
      if (DimletMapping.idToBlock.get(entry.getKey()) != null) {
        randomMaterialDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (entry.getValue().getKey().getType() == DimletType.DIMLET_LIQUID) {
      if (DimletMapping.idToFluid.get(entry.getKey()) != null) {
        randomLiquidDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (entry.getValue().getKey().getType() == DimletType.DIMLET_MOBS) {
      if (DimletMapping.idtoMob.get(entry.getKey()) != null) {
        randomMobDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (entry.getValue().getKey().getType() == DimletType.DIMLET_EFFECT) {
      if (DimletMapping.idToEffectType.get(entry.getKey()) != EffectType.EFFECT_NONE) {
        randomEffectDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (entry.getValue().getKey().getType() == DimletType.DIMLET_FEATURE) {
      if (DimletMapping.idToFeatureType.get(entry.getKey()) != FeatureType.FEATURE_NONE) {
        randomFeatureDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
  }
}

Fixed version (ground truth):
static void setupWeightedRandomList(Configuration cfg){
  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,Integer>();
  setupRarity(randomDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomMaterialDimlets=new WeightedRandomSelector<Integer,Integer>();
  setupRarity(randomMaterialDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomLiquidDimlets=new WeightedRandomSelector<Integer,Integer>();
  setupRarity(randomLiquidDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomMobDimlets=new WeightedRandomSelector<Integer,Integer>();
  setupRarity(randomMobDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomEffectDimlets=new WeightedRandomSelector<Integer,Integer>();
  setupRarity(randomEffectDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  randomFeatureDimlets=new WeightedRandomSelector<Integer,Integer>();
  setupRarity(randomFeatureDimlets,rarity0,rarity1,rarity2,rarity3,rarity4,rarity5,rarity6);
  for (  Map.Entry<Integer,DimletEntry> entry : KnownDimletConfiguration.idToDimlet.entrySet()) {
    randomDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
    if (entry.getValue().getKey().getType() == DimletType.DIMLET_MATERIAL) {
      if (DimletMapping.idToBlock.get(entry.getKey()) != null) {
        randomMaterialDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (entry.getValue().getKey().getType() == DimletType.DIMLET_LIQUID) {
      if (DimletMapping.idToFluid.get(entry.getKey()) != null) {
        randomLiquidDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (entry.getValue().getKey().getType() == DimletType.DIMLET_MOBS) {
      MobDescriptor descriptor=DimletMapping.idtoMob.get(entry.getKey());
      if (descriptor != null && descriptor.getEntityClass() != null) {
        randomMobDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (entry.getValue().getKey().getType() == DimletType.DIMLET_EFFECT) {
      if (DimletMapping.idToEffectType.get(entry.getKey()) != EffectType.EFFECT_NONE) {
        randomEffectDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
 else     if (entry.getValue().getKey().getType() == DimletType.DIMLET_FEATURE) {
      if (DimletMapping.idToFeatureType.get(entry.getKey()) != FeatureType.FEATURE_NONE) {
        randomFeatureDimlets.addItem(entry.getValue().getRarity(),entry.getKey());
      }
    }
  }
}