Program: 81824
Project: 81824
Buggy source:
/** 
 * Called from TextureStitchEvent.Post
 */
public static void setupReplacers(){
  boolean test=false;
  listFoliageReplacers.clear();
  if (!test) {
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.TALLGRASS.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str")).setStateSensitive(true).addComparable(BlockTallGrass.TYPE,BlockTallGrass.EnumType.GRASS));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.YELLOW_FLOWER.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str")).setBiomeColorize(false));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.RED_FLOWER.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str")).setBiomeColorize(false).setStateSensitive(true).addComparable(Blocks.RED_FLOWER.getTypeProperty(),BlockFlower.EnumFlowerType.ALLIUM));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.RED_FLOWER.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str")).setBiomeColorize(false).setStateSensitive(true).addComparable(Blocks.RED_FLOWER.getTypeProperty(),BlockFlower.EnumFlowerType.BLUE_ORCHID));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.RED_FLOWER.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str")).setBiomeColorize(false).setStateSensitive(true).addComparable(Blocks.RED_FLOWER.getTypeProperty(),BlockFlower.EnumFlowerType.POPPY));
    List<TextureAtlasSprite> sprites=new ArrayList<>();
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.DOUBLE_PLANT.getDefaultState(),2).setSprites(sprites).setStateSensitive(true).addComparable(BlockDoublePlant.VARIANT,BlockDoublePlant.EnumPlantType.GRASS));
    sprites=new ArrayList<>();
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.DOUBLE_PLANT.getDefaultState(),2).setSprites(sprites).setBiomeColorize(false).setStateSensitive(true).addComparable(BlockDoublePlant.VARIANT,BlockDoublePlant.EnumPlantType.ROSE));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.REEDS.getDefaultState(),-1).setSprite(getMeshAndSetupSprite("String_Node_Str")).setBaseMaterial(Material.SAND).setBiomeColorize(true).setRandomizeCoord(false).setLooseness(0.3F));
    for (int i=0; i < 8; i++) {
      int temp=i;
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.WHEAT.getDefaultState()).setBaseMaterial(Material.GROUND).setSprite(getMeshAndSetupSprite("String_Node_Str" + temp)).setRandomizeCoord(false).setStateSensitive(true).addComparable(BlockCrops.AGE,i));
    }
    HashMap<Integer,Integer> lookupStateToModel=new HashMap<>();
    lookupStateToModel.put(0,0);
    lookupStateToModel.put(1,0);
    lookupStateToModel.put(2,1);
    lookupStateToModel.put(3,1);
    lookupStateToModel.put(4,2);
    lookupStateToModel.put(5,2);
    lookupStateToModel.put(6,2);
    lookupStateToModel.put(7,3);
    for (    Map.Entry<Integer,Integer> entrySet : lookupStateToModel.entrySet()) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.CARROTS.getDefaultState()).setBaseMaterial(Material.GROUND).setSprite(getMeshAndSetupSprite("String_Node_Str" + entrySet.getValue())).setRandomizeCoord(false).setStateSensitive(true).addComparable(BlockCrops.AGE,entrySet.getKey()));
    }
    for (    Map.Entry<Integer,Integer> entrySet : lookupStateToModel.entrySet()) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.POTATOES.getDefaultState()).setBaseMaterial(Material.GROUND).setSprite(getMeshAndSetupSprite("String_Node_Str" + entrySet.getValue())).setRandomizeCoord(false).setStateSensitive(true).addComparable(BlockCrops.AGE,entrySet.getKey()));
    }
  }
 else {
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.TALLGRASS.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str")));
    if (true)     return;
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.YELLOW_FLOWER.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str")).setBiomeColorize(false));
    List<TextureAtlasSprite> sprites=new ArrayList<>();
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.DOUBLE_PLANT.getDefaultState(),2).setSprites(sprites));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.REEDS.getDefaultState(),-1).setSprite(getMeshAndSetupSprite("String_Node_Str")).setBaseMaterial(Material.SAND).setBiomeColorize(true).setRandomizeCoord(false));
    for (int i=0; i < 8; i++) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.TALLGRASS.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str" + i)).setRandomizeCoord(false));
    }
    for (int i=0; i < 4; i++) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.TALLGRASS.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str" + i)).setRandomizeCoord(false));
    }
    HashMap<Integer,Integer> lookupStateToModel=new HashMap<>();
    lookupStateToModel.put(0,0);
    lookupStateToModel.put(1,0);
    lookupStateToModel.put(2,1);
    lookupStateToModel.put(3,1);
    lookupStateToModel.put(4,2);
    lookupStateToModel.put(5,2);
    lookupStateToModel.put(6,2);
    lookupStateToModel.put(7,3);
    for (    Map.Entry<Integer,Integer> entrySet : lookupStateToModel.entrySet()) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.TALLGRASS.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str" + entrySet.getValue())));
    }
    for (    Map.Entry<Integer,Integer> entrySet : lookupStateToModel.entrySet()) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.TALLGRASS.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str" + entrySet.getValue())));
    }
  }
}

Fixed version (ground truth):
/** 
 * Called from TextureStitchEvent.Post
 */
public static void setupReplacers(){
  boolean test=false;
  listFoliageReplacers.clear();
  if (!test) {
    HashMap<Comparable,String> lookup=new HashMap<>();
    lookup.clear();
    lookup.put(BlockPlanks.EnumType.OAK,"String_Node_Str");
    lookup.put(BlockPlanks.EnumType.SPRUCE,"String_Node_Str");
    lookup.put(BlockPlanks.EnumType.BIRCH,"String_Node_Str");
    lookup.put(BlockPlanks.EnumType.JUNGLE,"String_Node_Str");
    lookup.put(BlockPlanks.EnumType.ACACIA,"String_Node_Str");
    lookup.put(BlockPlanks.EnumType.DARK_OAK,"String_Node_Str");
    for (    Map.Entry<Comparable,String> entrySet : lookup.entrySet()) {
      boolean colorize=false;
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.SAPLING.getDefaultState()).setSprite(getMeshAndSetupSprite(entrySet.getValue())).setStateSensitive(true).setBiomeColorize(colorize).addComparable(BlockSapling.TYPE,entrySet.getKey()));
    }
    lookup.clear();
    lookup.put(BlockTallGrass.EnumType.DEAD_BUSH,"String_Node_Str");
    lookup.put(BlockTallGrass.EnumType.GRASS,"String_Node_Str");
    lookup.put(BlockTallGrass.EnumType.FERN,"String_Node_Str");
    for (    Map.Entry<Comparable,String> entrySet : lookup.entrySet()) {
      boolean colorize=entrySet.getKey() == BlockTallGrass.EnumType.DEAD_BUSH ? false : true;
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.TALLGRASS.getDefaultState()).setSprite(getMeshAndSetupSprite(entrySet.getValue())).setStateSensitive(true).setBiomeColorize(colorize).addComparable(BlockTallGrass.TYPE,entrySet.getKey()));
    }
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.YELLOW_FLOWER.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str")).setBiomeColorize(false));
    lookup.clear();
    lookup.put(BlockFlower.EnumFlowerType.ALLIUM,"String_Node_Str");
    lookup.put(BlockFlower.EnumFlowerType.BLUE_ORCHID,"String_Node_Str");
    lookup.put(BlockFlower.EnumFlowerType.HOUSTONIA,"String_Node_Str");
    lookup.put(BlockFlower.EnumFlowerType.ORANGE_TULIP,"String_Node_Str");
    lookup.put(BlockFlower.EnumFlowerType.OXEYE_DAISY,"String_Node_Str");
    lookup.put(BlockFlower.EnumFlowerType.PINK_TULIP,"String_Node_Str");
    lookup.put(BlockFlower.EnumFlowerType.POPPY,"String_Node_Str");
    lookup.put(BlockFlower.EnumFlowerType.RED_TULIP,"String_Node_Str");
    lookup.put(BlockFlower.EnumFlowerType.WHITE_TULIP,"String_Node_Str");
    for (    Map.Entry<Comparable,String> entrySet : lookup.entrySet()) {
      boolean colorize=false;
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.RED_FLOWER.getDefaultState()).setSprite(getMeshAndSetupSprite(entrySet.getValue())).setStateSensitive(true).setBiomeColorize(colorize).addComparable(Blocks.RED_FLOWER.getTypeProperty(),entrySet.getKey()));
    }
    for (int i=0; i < 8; i++) {
      int temp=i;
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.WHEAT.getDefaultState()).setBaseMaterial(Material.GROUND).setSprite(getMeshAndSetupSprite("String_Node_Str" + temp)).setRandomizeCoord(false).setStateSensitive(true).addComparable(BlockCrops.AGE,i));
    }
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.REEDS.getDefaultState(),-1).setSprite(getMeshAndSetupSprite("String_Node_Str")).setBaseMaterial(Material.SAND).setBiomeColorize(true).setRandomizeCoord(false).setLooseness(0.3F));
    HashMap<Integer,Integer> lookupStateToModel=new HashMap<>();
    lookupStateToModel.put(0,0);
    lookupStateToModel.put(1,0);
    lookupStateToModel.put(2,1);
    lookupStateToModel.put(3,1);
    lookupStateToModel.put(4,2);
    lookupStateToModel.put(5,2);
    lookupStateToModel.put(6,2);
    lookupStateToModel.put(7,3);
    for (    Map.Entry<Integer,Integer> entrySet : lookupStateToModel.entrySet()) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.CARROTS.getDefaultState()).setBaseMaterial(Material.GROUND).setSprite(getMeshAndSetupSprite("String_Node_Str" + entrySet.getValue())).setRandomizeCoord(false).setStateSensitive(true).addComparable(BlockCrops.AGE,entrySet.getKey()));
    }
    for (    Map.Entry<Integer,Integer> entrySet : lookupStateToModel.entrySet()) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.POTATOES.getDefaultState()).setBaseMaterial(Material.GROUND).setSprite(getMeshAndSetupSprite("String_Node_Str" + entrySet.getValue())).setRandomizeCoord(false).setStateSensitive(true).addComparable(BlockCrops.AGE,entrySet.getKey()));
    }
    for (int i=0; i < 4; i++) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.BEETROOTS.getDefaultState()).setBaseMaterial(Material.GROUND).setSprite(getMeshAndSetupSprite("String_Node_Str" + i)).setRandomizeCoord(false).setStateSensitive(true).addComparable(BlockBeetroot.BEETROOT_AGE,i));
    }
    List<TextureAtlasSprite> sprites=new ArrayList<>();
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.DOUBLE_PLANT.getDefaultState(),2).setSprites(sprites).setStateSensitive(true).addComparable(BlockDoublePlant.VARIANT,BlockDoublePlant.EnumPlantType.GRASS));
    sprites=new ArrayList<>();
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.DOUBLE_PLANT.getDefaultState(),2).setSprites(sprites).setBiomeColorize(false).setStateSensitive(true).addComparable(BlockDoublePlant.VARIANT,BlockDoublePlant.EnumPlantType.ROSE));
    sprites=new ArrayList<>();
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.DOUBLE_PLANT.getDefaultState(),2).setSprites(sprites).setBiomeColorize(true).setStateSensitive(true).addComparable(BlockDoublePlant.VARIANT,BlockDoublePlant.EnumPlantType.FERN));
    sprites=new ArrayList<>();
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.DOUBLE_PLANT.getDefaultState(),2).setSprites(sprites).setBiomeColorize(false).setStateSensitive(true).addComparable(BlockDoublePlant.VARIANT,BlockDoublePlant.EnumPlantType.PAEONIA));
    sprites=new ArrayList<>();
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.DOUBLE_PLANT.getDefaultState(),2).setSprites(sprites).setBiomeColorize(false).setStateSensitive(true).addComparable(BlockDoublePlant.VARIANT,BlockDoublePlant.EnumPlantType.SYRINGA));
  }
 else {
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.TALLGRASS.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str")));
    if (true)     return;
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.YELLOW_FLOWER.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str")).setBiomeColorize(false));
    List<TextureAtlasSprite> sprites=new ArrayList<>();
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    sprites.add(getMeshAndSetupSprite("String_Node_Str"));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.DOUBLE_PLANT.getDefaultState(),2).setSprites(sprites));
    listFoliageReplacers.add(new FoliageReplacerCross(Blocks.REEDS.getDefaultState(),-1).setSprite(getMeshAndSetupSprite("String_Node_Str")).setBaseMaterial(Material.SAND).setBiomeColorize(true).setRandomizeCoord(false));
    for (int i=0; i < 8; i++) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.TALLGRASS.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str" + i)).setRandomizeCoord(false));
    }
    for (int i=0; i < 4; i++) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.TALLGRASS.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str" + i)).setRandomizeCoord(false));
    }
    HashMap<Integer,Integer> lookupStateToModel=new HashMap<>();
    lookupStateToModel.put(0,0);
    lookupStateToModel.put(1,0);
    lookupStateToModel.put(2,1);
    lookupStateToModel.put(3,1);
    lookupStateToModel.put(4,2);
    lookupStateToModel.put(5,2);
    lookupStateToModel.put(6,2);
    lookupStateToModel.put(7,3);
    for (    Map.Entry<Integer,Integer> entrySet : lookupStateToModel.entrySet()) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.TALLGRASS.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str" + entrySet.getValue())));
    }
    for (    Map.Entry<Integer,Integer> entrySet : lookupStateToModel.entrySet()) {
      listFoliageReplacers.add(new FoliageReplacerCross(Blocks.TALLGRASS.getDefaultState()).setSprite(getMeshAndSetupSprite("String_Node_Str" + entrySet.getValue())));
    }
  }
}