nus-yam/ex-repair huggingface dataset:
Program: 63594
Project: 63594
Buggy source:
@Override protected void drawGuiContainerBackgroundLayer(float var1,int mouseX,int mouseY){
  super.drawGuiContainerBackgroundLayer(var1,mouseX,mouseY);
  String str=StatCollector.translateToLocal("String_Node_Str").toUpperCase();
  fontRendererObj.drawString(str,startX + 8 + textLayout.getCenteredOffset(str,138),startY + 16,fontColor.get("String_Node_Str"));
  Set<BiomeDictionary.Type> activeBiomeTypes=EnumSet.noneOf(BiomeDictionary.Type.class);
  for (  BiomeGenBase biome : inventory.getBiomesToSearch()) {
    Collections.addAll(activeBiomeTypes,BiomeDictionary.getTypesForBiome(biome));
  }
  for (  HabitatSlot habitatSlot : habitatSlots) {
    habitatSlot.setActive(activeBiomeTypes);
  }
  for (  HabitatSlot slot : habitatSlots) {
    slot.draw(startX,startY);
  }
  GL11.glColor4f(1.0f,1.0f,1.0f,1.0f);
}

Fixed version (ground truth):
@Override protected void drawGuiContainerBackgroundLayer(float var1,int mouseX,int mouseY){
  super.drawGuiContainerBackgroundLayer(var1,mouseX,mouseY);
  String str=StatCollector.translateToLocal("String_Node_Str").toUpperCase();
  fontRendererObj.drawString(str,startX + 8 + textLayout.getCenteredOffset(str,138),startY + 16,fontColor.get("String_Node_Str"));
  Set<BiomeDictionary.Type> activeBiomeTypes=EnumSet.noneOf(BiomeDictionary.Type.class);
  for (  BiomeGenBase biome : inventory.getBiomesToSearch()) {
    Collections.addAll(activeBiomeTypes,BiomeDictionary.getTypesForBiome(biome));
  }
  for (  HabitatSlot habitatSlot : habitatSlots) {
    habitatSlot.setActive(activeBiomeTypes);
  }
  for (  HabitatSlot slot : habitatSlots) {
    slot.draw(startX,startY);
  }
  GlStateManager.color(1.0f,1.0f,1.0f,1.0f);
}
Program: 63595
Project: 63595
Buggy source:
@Override public void draw(int startX,int startY){
  if (getIcon() != null) {
    if (!isActive) {
      GL11.glColor4f(0.2f,0.2f,0.2f,0.2f);
    }
 else {
      GL11.glColor4f(1.0f,1.0f,1.0f,1.0f);
    }
    Proxies.render.bindTexture(TextureMap.locationBlocksTexture);
    manager.gui.drawTexturedModalRect(startX + xPos,startY + yPos,getIcon(),16,16);
  }
}

Fixed version (ground truth):
@Override public void draw(int startX,int startY){
  if (getIcon() != null) {
    if (!isActive) {
      GlStateManager.color(0.2f,0.2f,0.2f,0.2f);
    }
 else {
      GlStateManager.color(1.0f,1.0f,1.0f,1.0f);
    }
    Proxies.render.bindTexture(TextureMap.locationBlocksTexture);
    manager.gui.drawTexturedModalRect(startX + xPos,startY + yPos,getIcon(),16,16);
  }
}
Program: 63596
Project: 63596
Buggy source:
public void render(EnumFacing orientation,float posX,float posY,float posZ){
  GL11.glPushMatrix();
  GL11.glTranslatef(posX,posY,posZ);
  float[] angle={0,0,0};
  if (orientation == null) {
    orientation=EnumFacing.WEST;
  }
switch (orientation) {
case EAST:
    angle[1]=(float)Math.PI / 2;
  break;
case WEST:
angle[1]=-(float)Math.PI / 2;
break;
case SOUTH:
break;
case NORTH:
default :
angle[1]=(float)Math.PI;
break;
}
float factor=(float)(1.0 / 16.0);
Proxies.render.bindTexture(textures[0]);
pedestal.rotateAngleX=angle[0];
pedestal.rotateAngleY=angle[1];
pedestal.rotateAngleZ=angle[2];
pedestal.render(factor);
cover.rotateAngleX=angle[0];
cover.rotateAngleY=angle[1];
cover.rotateAngleZ=(float)Math.PI;
cover.render(factor);
tower1.rotateAngleX=angle[0];
tower1.rotateAngleY=angle[1];
tower1.rotateAngleZ=angle[2];
Proxies.render.bindTexture(textures[1]);
tower1.render(factor);
tower2.rotateAngleX=angle[0];
tower2.rotateAngleY=angle[1];
tower2.rotateAngleZ=angle[2];
Proxies.render.bindTexture(textures[2]);
tower2.render(factor);
GL11.glPopMatrix();
}

Fixed version (ground truth):
public void render(EnumFacing orientation,float posX,float posY,float posZ){
  GlStateManager.pushMatrix();
  GlStateManager.translate(posX,posY,posZ);
  float[] angle={0,0,0};
  if (orientation == null) {
    orientation=EnumFacing.WEST;
  }
switch (orientation) {
case EAST:
    angle[1]=(float)Math.PI / 2;
  break;
case WEST:
angle[1]=-(float)Math.PI / 2;
break;
case SOUTH:
break;
case NORTH:
default :
angle[1]=(float)Math.PI;
break;
}
float factor=(float)(1.0 / 16.0);
Proxies.render.bindTexture(textures[0]);
pedestal.rotateAngleX=angle[0];
pedestal.rotateAngleY=angle[1];
pedestal.rotateAngleZ=angle[2];
pedestal.render(factor);
cover.rotateAngleX=angle[0];
cover.rotateAngleY=angle[1];
cover.rotateAngleZ=(float)Math.PI;
cover.render(factor);
tower1.rotateAngleX=angle[0];
tower1.rotateAngleY=angle[1];
tower1.rotateAngleZ=angle[2];
Proxies.render.bindTexture(textures[1]);
tower1.render(factor);
tower2.rotateAngleX=angle[0];
tower2.rotateAngleY=angle[1];
tower2.rotateAngleZ=angle[2];
Proxies.render.bindTexture(textures[2]);
tower2.render(factor);
GlStateManager.popMatrix();
}
Program: 63597
Project: 63597
Buggy source:
@Override public void render(Entity entity,float f,float f1,float swing,float f3,float f4,float f5){
  super.render(entity,f,f1,swing,f3,f4,f5);
  wingRight.rotateAngleZ=MathHelper.cos(swing * 1.3F) * (float)Math.PI * 0.25F;
  wingLeft.rotateAngleZ=-wingRight.rotateAngleZ;
  GL11.glPushMatrix();
  float scale=0.75f;
  GL11.glScalef(scale,scale,scale);
  GL11.glTranslatef(0.0F,12.0f / scale * f5,0.0F);
  snout.render(f5);
  torsoWing.render(f5);
  rump.render(f5);
  tail.render(f5);
  tailEnd.render(f5);
  bridge.render(f5);
  eyeRight.render(f5);
  eyeLeft.render(f5);
  wingLeft.render(f5);
  wingRight.render(f5);
  if (type == EnumBeeType.PRINCESS) {
    crownPrincess.render(f5);
  }
 else   if (type == EnumBeeType.QUEEN) {
    crownQueen.render(f5);
  }
  GL11.glPopMatrix();
}

Fixed version (ground truth):
@Override public void render(Entity entity,float f,float f1,float swing,float f3,float f4,float f5){
  super.render(entity,f,f1,swing,f3,f4,f5);
  wingRight.rotateAngleZ=MathHelper.cos(swing * 1.3F) * (float)Math.PI * 0.25F;
  wingLeft.rotateAngleZ=-wingRight.rotateAngleZ;
  GlStateManager.pushMatrix();
  float scale=0.75f;
  GlStateManager.scale(scale,scale,scale);
  GlStateManager.translate(0.0F,12.0f / scale * f5,0.0F);
  snout.render(f5);
  torsoWing.render(f5);
  rump.render(f5);
  tail.render(f5);
  tailEnd.render(f5);
  bridge.render(f5);
  eyeRight.render(f5);
  eyeLeft.render(f5);
  wingLeft.render(f5);
  wingRight.render(f5);
  if (type == EnumBeeType.PRINCESS) {
    crownPrincess.render(f5);
  }
 else   if (type == EnumBeeType.QUEEN) {
    crownQueen.render(f5);
  }
  GlStateManager.popMatrix();
}
Program: 63599
Project: 63599
Buggy source:
protected void drawFertilityInfo(int fertility,int x,int textColor,int texOffset){
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  String fertilityString=Integer.toString(fertility) + "String_Node_Str";
  int stringWidth=fontRendererObj.getStringWidth(fertilityString);
  Proxies.render.bindTexture(textureFile);
  drawTexturedModalRect(guiLeft + x + stringWidth+ 2,guiTop + textLayout.getLineY() - 1,60,240 + texOffset,12,8);
  textLayout.drawLine(fertilityString,x,textColor);
}

Fixed version (ground truth):
protected void drawFertilityInfo(int fertility,int x,int textColor,int texOffset){
  GlStateManager.color(1.0F,1.0F,1.0F,1.0F);
  String fertilityString=Integer.toString(fertility) + "String_Node_Str";
  int stringWidth=fontRendererObj.getStringWidth(fertilityString);
  Proxies.render.bindTexture(textureFile);
  drawTexturedModalRect(guiLeft + x + stringWidth+ 2,guiTop + textLayout.getLineY() - 1,60,240 + texOffset,12,8);
  textLayout.drawLine(fertilityString,x,textColor);
}
Program: 63600
Project: 63600
Buggy source:
private void drawProbabilityArrow(IMutation combination,int x,int y){
  float chance=combination.getBaseChance();
  int line=247;
  int column=100;
switch (EnumMutateChance.rateChance(chance)) {
case HIGHEST:
    column=100;
  break;
case HIGHER:
column=100 + 15;
break;
case HIGH:
column=100 + 15 * 2;
break;
case NORMAL:
column=100 + 15 * 3;
break;
case LOW:
column=100 + 15 * 4;
break;
case LOWEST:
column=100 + 15 * 5;
default :
break;
}
Proxies.render.bindTexture(textureFile);
drawTexturedModalRect(x,y,column,line,15,9);
boolean researched=breedingTracker.isResearched(combination);
if (researched) {
fontRendererObj.drawString("String_Node_Str",x + 9,y + 1,0);
GL11.glColor4f(1.0f,1.0f,1.0f,1.0f);
}
}

Fixed version (ground truth):
private void drawProbabilityArrow(IMutation combination,int x,int y){
  float chance=combination.getBaseChance();
  int line=247;
  int column=100;
switch (EnumMutateChance.rateChance(chance)) {
case HIGHEST:
    column=100;
  break;
case HIGHER:
column=100 + 15;
break;
case HIGH:
column=100 + 15 * 2;
break;
case NORMAL:
column=100 + 15 * 3;
break;
case LOW:
column=100 + 15 * 4;
break;
case LOWEST:
column=100 + 15 * 5;
default :
break;
}
Proxies.render.bindTexture(textureFile);
drawTexturedModalRect(x,y,column,line,15,9);
boolean researched=breedingTracker.isResearched(combination);
if (researched) {
fontRendererObj.drawString("String_Node_Str",x + 9,y + 1,0);
GlStateManager.color(1.0f,1.0f,1.0f,1.0f);
}
}
Program: 63601
Project: 63601
Buggy source:
protected void drawToleranceInfo(IAlleleTolerance toleranceAllele,int x){
  int textColor=getColorCoding(toleranceAllele.isDominant());
  EnumTolerance tolerance=toleranceAllele.getValue();
  String text="String_Node_Str" + toleranceAllele.getName() + "String_Node_Str";
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
switch (tolerance) {
case BOTH_1:
case BOTH_2:
case BOTH_3:
case BOTH_4:
case BOTH_5:
    drawBothSymbol(x - 2,textLayout.getLineY() - 1);
  textLayout.drawLine(text,x + 14,textColor);
break;
case DOWN_1:
case DOWN_2:
case DOWN_3:
case DOWN_4:
case DOWN_5:
drawDownSymbol(x - 2,textLayout.getLineY() - 1);
textLayout.drawLine(text,x + 14,textColor);
break;
case UP_1:
case UP_2:
case UP_3:
case UP_4:
case UP_5:
drawUpSymbol(x - 2,textLayout.getLineY() - 1);
textLayout.drawLine(text,x + 14,textColor);
break;
default :
drawNoneSymbol(x - 2,textLayout.getLineY() - 1);
textLayout.drawLine("String_Node_Str",x + 14,textColor);
break;
}
}

Fixed version (ground truth):
protected void drawToleranceInfo(IAlleleTolerance toleranceAllele,int x){
  int textColor=getColorCoding(toleranceAllele.isDominant());
  EnumTolerance tolerance=toleranceAllele.getValue();
  String text="String_Node_Str" + toleranceAllele.getName() + "String_Node_Str";
  GlStateManager.color(1.0F,1.0F,1.0F,1.0F);
switch (tolerance) {
case BOTH_1:
case BOTH_2:
case BOTH_3:
case BOTH_4:
case BOTH_5:
    drawBothSymbol(x - 2,textLayout.getLineY() - 1);
  textLayout.drawLine(text,x + 14,textColor);
break;
case DOWN_1:
case DOWN_2:
case DOWN_3:
case DOWN_4:
case DOWN_5:
drawDownSymbol(x - 2,textLayout.getLineY() - 1);
textLayout.drawLine(text,x + 14,textColor);
break;
case UP_1:
case UP_2:
case UP_3:
case UP_4:
case UP_5:
drawUpSymbol(x - 2,textLayout.getLineY() - 1);
textLayout.drawLine(text,x + 14,textColor);
break;
default :
drawNoneSymbol(x - 2,textLayout.getLineY() - 1);
textLayout.drawLine("String_Node_Str",x + 14,textColor);
break;
}
}
Program: 63602
Project: 63602
Buggy source:
@Override protected void drawGuiContainerBackgroundLayer(float var1,int mouseX,int mouseY){
  super.drawGuiContainerBackgroundLayer(var1,mouseX,mouseY);
  for (int i=0; i <= inventory.getGame().getBountyLevel() / 4; i++) {
    GuiUtil.drawItemStack(this,LEVEL_ITEM,guiLeft + 170 + i * 8,guiTop + 7);
  }
  textLayout.startPage();
{
    GL11.glScaled(0.5,0.5,0.5);
    GL11.glTranslated(guiLeft + 170,guiTop + 10,0.0);
    textLayout.newLine();
    textLayout.newLine();
    String format=EnumChatFormatting.UNDERLINE + EnumChatFormatting.ITALIC.toString();
    int attemptNo=EscritoireGame.BOUNTY_MAX - inventory.getGame().getBountyLevel();
    String attemptNoString=StringUtil.localizeAndFormat("String_Node_Str",attemptNo);
    textLayout.drawLine(format + attemptNoString,170,fontColor.get("String_Node_Str"));
    textLayout.newLine();
    String escritoireText=textSource.getText(inventory.getGame());
    textLayout.drawSplitLine(escritoireText,170,90,fontColor.get("String_Node_Str"));
  }
  textLayout.endPage();
}

Fixed version (ground truth):
@Override protected void drawGuiContainerBackgroundLayer(float var1,int mouseX,int mouseY){
  super.drawGuiContainerBackgroundLayer(var1,mouseX,mouseY);
  for (int i=0; i <= inventory.getGame().getBountyLevel() / 4; i++) {
    GuiUtil.drawItemStack(this,LEVEL_ITEM,guiLeft + 170 + i * 8,guiTop + 7);
  }
  textLayout.startPage();
{
    GlStateManager.scale(0.5,0.5,0.5);
    GlStateManager.translate(guiLeft + 170,guiTop + 10,0.0);
    textLayout.newLine();
    textLayout.newLine();
    String format=EnumChatFormatting.UNDERLINE + EnumChatFormatting.ITALIC.toString();
    int attemptNo=EscritoireGame.BOUNTY_MAX - inventory.getGame().getBountyLevel();
    String attemptNoString=StringUtil.localizeAndFormat("String_Node_Str",attemptNo);
    textLayout.drawLine(format + attemptNoString,170,fontColor.get("String_Node_Str"));
    textLayout.newLine();
    String escritoireText=textSource.getText(inventory.getGame());
    textLayout.drawSplitLine(escritoireText,170,90,fontColor.get("String_Node_Str"));
  }
  textLayout.endPage();
}
Program: 63603
Project: 63603
Buggy source:
protected void bindTexture(ResourceLocation texturePath){
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  Proxies.render.bindTexture(texturePath);
}

Fixed version (ground truth):
protected void bindTexture(ResourceLocation texturePath){
  GlStateManager.color(1.0F,1.0F,1.0F,1.0F);
  Proxies.render.bindTexture(texturePath);
}
Program: 63604
Project: 63604
Buggy source:
@Override protected void drawGuiContainerBackgroundLayer(float f,int mouseX,int mouseY){
  bindTexture(textureFile);
  int x=(width - xSize) / 2;
  int y=(height - ySize) / 2;
  drawTexturedModalRect(x,y,0,0,xSize,ySize);
  GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
{
    RenderHelper.enableGUIStandardItemLighting();
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glDisable(GL11.GL_DEPTH_TEST);
    GL11.glPushMatrix();
{
      GL11.glTranslatef(guiLeft,guiTop,0.0F);
      GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
      GL11.glEnable(GL12.GL_RESCALE_NORMAL);
      OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,240 / 1.0F,240 / 1.0F);
      GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
      drawWidgets();
    }
    GL11.glPopMatrix();
  }
  GL11.glPopAttrib();
  bindTexture(textureFile);
}

Fixed version (ground truth):
@Override protected void drawGuiContainerBackgroundLayer(float f,int mouseX,int mouseY){
  bindTexture(textureFile);
  int x=(width - xSize) / 2;
  int y=(height - ySize) / 2;
  drawTexturedModalRect(x,y,0,0,xSize,ySize);
  RenderHelper.enableGUIStandardItemLighting();
  GlStateManager.disableLighting();
  GlStateManager.enableRescaleNormal();
  GlStateManager.color(1.0F,1.0F,1.0F,1.0F);
  GlStateManager.pushMatrix();
{
    GlStateManager.translate(guiLeft,guiTop,0.0F);
    drawWidgets();
  }
  GlStateManager.popMatrix();
  bindTexture(textureFile);
}
Program: 63605
Project: 63605
Buggy source:
public static void drawItemStack(GuiForestry gui,ItemStack stack,int xPos,int yPos){
  GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
  RenderHelper.enableGUIStandardItemLighting();
  RenderItem itemRender=GuiForestry.getItemRenderer();
  GL11.glTranslatef(0.0F,0.0F,32.0F);
  gui.setZLevel(100.0F);
  itemRender.zLevel=100.0F;
  FontRenderer font=null;
  if (stack != null) {
    font=stack.getItem().getFontRenderer(stack);
  }
  if (font == null) {
    font=gui.getFontRenderer();
  }
  itemRender.renderItemAndEffectIntoGUI(stack,xPos,yPos);
  itemRender.renderItemOverlayIntoGUI(font,stack,xPos,yPos,"String_Node_Str");
  gui.setZLevel(0.0F);
  itemRender.zLevel=0.0F;
  RenderHelper.disableStandardItemLighting();
  GL11.glPopAttrib();
}

Fixed version (ground truth):
public static void drawItemStack(GuiForestry gui,ItemStack stack,int xPos,int yPos){
  FontRenderer font=null;
  if (stack != null) {
    font=stack.getItem().getFontRenderer(stack);
  }
  if (font == null) {
    font=gui.getFontRenderer();
  }
  RenderItem itemRender=GuiForestry.getItemRenderer();
  itemRender.renderItemAndEffectIntoGUI(stack,xPos,yPos);
  itemRender.renderItemOverlayIntoGUI(font,stack,xPos,yPos,null);
}
Program: 63606
Project: 63606
Buggy source:
@Override public void setupAPI(){
  ChipsetManager.solderManager=new SolderManager();
  ChipsetManager.circuitRegistry=new CircuitRegistry();
  AlleleRegistry alleleRegistry=new AlleleRegistry();
  AlleleManager.alleleRegistry=alleleRegistry;
  AlleleManager.climateHelper=new ClimateUtil();
  AlleleManager.alleleFactory=new AlleleFactory();
  alleleRegistry.initialize();
  AlleleHelper.instance=new AlleleHelper();
  MultiblockManager.logicFactory=new MultiblockLogicFactory();
  ForestryAPI.climateManager=new ClimateManager();
  CapabilityIndividual.register();
}

Fixed version (ground truth):
@Override public void setupAPI(){
  ChipsetManager.solderManager=new SolderManager();
  ChipsetManager.circuitRegistry=new CircuitRegistry();
  AlleleRegistry alleleRegistry=new AlleleRegistry();
  AlleleManager.alleleRegistry=alleleRegistry;
  AlleleManager.climateHelper=new ClimateUtil();
  AlleleManager.alleleFactory=new AlleleFactory();
  alleleRegistry.initialize();
  AlleleHelper.instance=new AlleleHelper();
  MultiblockManager.logicFactory=new MultiblockLogicFactory();
  ForestryAPI.climateManager=new ClimateManager();
}
Program: 63607
Project: 63607
Buggy source:
@Override public void updateTask(){
  if (continueExecuting()) {
    if (entity.getButterfly().getMate() == null) {
      if (entity.cooldownMate <= 0 && entity.getDistanceSqToEntity(targetMate) < 9.0D) {
        entity.getButterfly().mate(targetMate.getButterfly());
        entity.cooldownMate=EntityButterfly.COOLDOWNS;
      }
    }
 else {
      IPollinatable tile=GeneticsUtil.getOrCreatePollinatable(null,entity.worldObj,rest);
      if (tile instanceof IButterflyNursery) {
        IButterflyNursery nursery=(IButterflyNursery)tile;
        if (nursery.canNurse(entity.getButterfly())) {
          nursery.setCaterpillar(entity.getButterfly().spawnCaterpillar(entity.worldObj,nursery));
          if (entity.getRNG().nextFloat() < 1.0f / entity.getButterfly().getGenome().getFertility()) {
            entity.setHealth(0);
          }
        }
      }
      setHasInteracted();
      entity.cooldownEgg=EntityButterfly.COOLDOWNS;
    }
  }
}

Fixed version (ground truth):
@Override public void updateTask(){
  if (continueExecuting()) {
    if (entity.getButterfly().getMate() == null) {
      if (entity.cooldownMate <= 0 && entity.getDistanceSqToEntity(targetMate) < 9.0D) {
        entity.getButterfly().mate(targetMate.getButterfly());
        targetMate.getButterfly().mate(entity.getButterfly());
        entity.cooldownMate=EntityButterfly.COOLDOWNS;
      }
    }
 else {
      IPollinatable tile=GeneticsUtil.getOrCreatePollinatable(null,entity.worldObj,rest);
      if (tile instanceof IButterflyNursery) {
        IButterflyNursery nursery=(IButterflyNursery)tile;
        if (nursery.canNurse(entity.getButterfly())) {
          nursery.setCaterpillar(entity.getButterfly().spawnCaterpillar(entity.worldObj,nursery));
          if (entity.getRNG().nextFloat() < 1.0f / entity.getButterfly().getGenome().getFertility()) {
            entity.setHealth(0);
          }
        }
      }
      setHasInteracted();
      entity.cooldownEgg=EntityButterfly.COOLDOWNS;
    }
  }
}
Program: 63608
Project: 63608
Buggy source:
@Override public void onNeighborBlockChange(World world,BlockPos pos,IBlockState state,Block neighborBlock){
  super.onNeighborBlockChange(world,pos,state,neighborBlock);
  TileEntity tileEntity=world.getTileEntity(pos);
  if (tileEntity instanceof TileAlveary) {
    TileAlveary tileAlveary=(TileAlveary)tileEntity;
    tileAlveary.getMultiblockLogic().getController().reassemble();
  }
}

Fixed version (ground truth):
@Override public void onNeighborBlockChange(World world,BlockPos pos,IBlockState state,Block neighborBlock){
  super.onNeighborBlockChange(world,pos,state,neighborBlock);
  TileEntity tileEntity=world.getTileEntity(pos);
  if (tileEntity instanceof TileAlveary) {
    TileAlveary tileAlveary=(TileAlveary)tileEntity;
    IAlvearyControllerInternal alvery=tileAlveary.getMultiblockLogic().getController();
    alvery.reassemble();
    Proxies.net.sendNetworkPacket(new PacketAlveryChange(alvery),world);
  }
}
Program: 63609
Project: 63609
Buggy source:
@Override public void registerPackets(){
  registerClientPacket(new PacketImprintSelectionResponse());
  registerClientPacket(new PacketActiveUpdate());
  registerClientPacket(new PacketBeeLogicActive());
  registerClientPacket(new PacketBeeLogicActiveEntity());
  registerClientPacket(new PacketHabitatBiomePointer());
  registerClientPacket(new PacketCandleUpdate());
  registerServerPacket(new PacketBeeLogicEntityRequest());
}

Fixed version (ground truth):
@Override public void registerPackets(){
  registerClientPacket(new PacketImprintSelectionResponse());
  registerClientPacket(new PacketActiveUpdate());
  registerClientPacket(new PacketBeeLogicActive());
  registerClientPacket(new PacketBeeLogicActiveEntity());
  registerClientPacket(new PacketHabitatBiomePointer());
  registerClientPacket(new PacketCandleUpdate());
  registerServerPacket(new PacketBeeLogicEntityRequest());
  registerClientPacket(new PacketAlveryChange());
}
Program: 63610
Project: 63610
Buggy source:
public static boolean isWoodSlabBlock(Block block,IBlockAccess world,BlockPos pos){
  if (block == null || block.isAir(world,pos)) {
    return false;
  }
  int[] oreIds=OreDictionary.getOreIDs(new ItemStack(block));
  for (  int oreId : oreIds) {
    if (oreId == slabWoodId) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean isWoodSlabBlock(Block block,IBlockAccess world,BlockPos pos){
  if (block == null || block.isAir(world,pos)) {
    return false;
  }
  if (Item.getItemFromBlock(block) == null) {
    return false;
  }
  int[] oreIds=OreDictionary.getOreIDs(new ItemStack(block));
  for (  int oreId : oreIds) {
    if (oreId == slabWoodId) {
      return true;
    }
  }
  return false;
}
Program: 63611
Project: 63611
Buggy source:
@Override public void onNeighborBlockChange(World world,BlockPos pos,IBlockState state,Block neighborBlock){
  super.onNeighborBlockChange(world,pos,state,neighborBlock);
  TileEntity tileEntity=world.getTileEntity(pos);
  if (tileEntity instanceof TileAlveary) {
    TileAlveary tileAlveary=(TileAlveary)tileEntity;
    IAlvearyControllerInternal alvery=tileAlveary.getMultiblockLogic().getController();
    alvery.reassemble();
    Proxies.net.sendNetworkPacket(new PacketAlveryChange(alvery),world);
  }
}

Fixed version (ground truth):
@Override public void onNeighborBlockChange(World world,BlockPos pos,IBlockState state,Block neighborBlock){
  super.onNeighborBlockChange(world,pos,state,neighborBlock);
  TileEntity tileEntity=world.getTileEntity(pos);
  if (tileEntity instanceof TileAlveary) {
    TileAlveary tileAlveary=(TileAlveary)tileEntity;
    IAlvearyControllerInternal alveary=tileAlveary.getMultiblockLogic().getController();
    alveary.reassemble();
    if (alveary.getReferenceCoord() != null) {
      Proxies.net.sendNetworkPacket(new PacketAlveryChange(alveary),world);
    }
  }
}
Program: 63612
Project: 63612
Buggy source:
@Override public IGreenhouseState getGreenhouseState(World world,BlockPos pos){
  for (  IMultiblockControllerInternal controllerInternal : MultiblockRegistry.getControllersFromWorld(world)) {
    if (controllerInternal instanceof IGreenhouseControllerInternal) {
      if (controllerInternal.isAssembled()) {
        if (isPosiotionInGreenhouse((IGreenhouseControllerInternal)controllerInternal,pos)) {
          return ((IGreenhouseControllerInternal)controllerInternal).createState();
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IGreenhouseState getGreenhouseState(World world,BlockPos pos){
  if (MultiblockRegistry.getControllersFromWorld(world) != null) {
    for (    IMultiblockControllerInternal controllerInternal : MultiblockRegistry.getControllersFromWorld(world)) {
      if (controllerInternal instanceof IGreenhouseControllerInternal) {
        if (controllerInternal.isAssembled()) {
          if (isPosiotionInGreenhouse((IGreenhouseControllerInternal)controllerInternal,pos)) {
            return ((IGreenhouseControllerInternal)controllerInternal).createState();
          }
        }
      }
    }
  }
  return null;
}
Program: 63613
Project: 63613
Buggy source:
ModelResourceLocation getModel(EnumBeeType type);

Fixed version (ground truth):
@SideOnly(Side.CLIENT) ModelResourceLocation getModel(EnumBeeType type);
Program: 63614
Project: 63614
Buggy source:
void registerModels(Item item,IModelManager manager);

Fixed version (ground truth):
@SideOnly(Side.CLIENT) void registerModels(Item item,IModelManager manager);
Program: 63615
Project: 63615
Buggy source:
void registerStateMapper();

Fixed version (ground truth):
@SideOnly(Side.CLIENT) void registerStateMapper();
Program: 63616
Project: 63616
Buggy source:
@Override public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new AlvearyStateMapper(getAlvearyType()));
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new AlvearyStateMapper(getAlvearyType()));
}
Program: 63617
Project: 63617
Buggy source:
@Override public ModelResourceLocation getModel(EnumBeeType type){
  return models[type.ordinal()];
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public ModelResourceLocation getModel(EnumBeeType type){
  return models[type.ordinal()];
}
Program: 63618
Project: 63618
Buggy source:
@Override public void registerModels(Item item,IModelManager manager){
  String beeIconDir="String_Node_Str";
  EnumBeeType beeType=((ItemBeeGE)item).getType();
  String beeTypeNameBase=beeIconDir + beeType.toString().toLowerCase(Locale.ENGLISH);
  models[beeType.ordinal()]=manager.getModelLocation(beeTypeNameBase);
  manager.registerVariant(item,new ResourceLocation("String_Node_Str" + beeTypeNameBase));
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerModels(Item item,IModelManager manager){
  String beeIconDir="String_Node_Str";
  EnumBeeType beeType=((ItemBeeGE)item).getType();
  String beeTypeNameBase=beeIconDir + beeType.toString().toLowerCase(Locale.ENGLISH);
  if (models == null) {
    models=new ModelResourceLocation[EnumBeeType.values().length];
  }
  models[beeType.ordinal()]=manager.getModelLocation(beeTypeNameBase);
  manager.registerVariant(item,new ResourceLocation("String_Node_Str" + beeTypeNameBase));
}
Program: 63619
Project: 63619
Buggy source:
@Override public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new WoodTypeStateMapper(this,null));
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new WoodTypeStateMapper(this,null));
}
Program: 63620
Project: 63620
Buggy source:
@Override public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new WoodTypeStateMapper(this,getVariant()));
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new WoodTypeStateMapper(this,getVariant()));
}
Program: 63621
Project: 63621
Buggy source:
@Override public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new WoodTypeStateMapper(this,getVariant()));
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new WoodTypeStateMapper(this,getVariant()));
}
Program: 63622
Project: 63622
Buggy source:
@Override public void registerStateMapper(){
  String blockPath=isDouble() ? "String_Node_Str" : "String_Node_Str";
  Proxies.render.registerStateMapper(this,new WoodTypeStateMapper(this,blockPath,getVariant()));
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerStateMapper(){
  String blockPath=isDouble() ? "String_Node_Str" : "String_Node_Str";
  Proxies.render.registerStateMapper(this,new WoodTypeStateMapper(this,blockPath,getVariant()));
}
Program: 63623
Project: 63623
Buggy source:
@Override public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new WoodTypeStateMapper(this,null));
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new WoodTypeStateMapper(this,null));
}
Program: 63624
Project: 63624
Buggy source:
@Override public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new SaplingStateMapper());
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new SaplingStateMapper());
}
Program: 63625
Project: 63625
Buggy source:
@Override public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new MachineStateMapper<>(machinePropertiesClass,TYPE,FACE));
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new MachineStateMapper<>(machinePropertiesClass,TYPE,FACE));
}
Program: 63626
Project: 63626
Buggy source:
@SideOnly(Side.CLIENT) @Override public void registerModel(Item item,IModelManager manager){
  models[0]=manager.getModelLocation("String_Node_Str");
  models[1]=manager.getModelLocation("String_Node_Str");
  manager.registerVariant(item,new ResourceLocation("String_Node_Str"));
  manager.registerVariant(item,new ResourceLocation("String_Node_Str"));
  manager.registerItemModel(item,new PipetteMeshDefinition());
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public void registerModel(Item item,IModelManager manager){
  models=new ModelResourceLocation[2];
  models[0]=manager.getModelLocation("String_Node_Str");
  models[1]=manager.getModelLocation("String_Node_Str");
  manager.registerVariant(item,new ResourceLocation("String_Node_Str"));
  manager.registerVariant(item,new ResourceLocation("String_Node_Str"));
  manager.registerItemModel(item,new PipetteMeshDefinition());
}
Program: 63627
Project: 63627
Buggy source:
public static void registerModels(){
  for (  Block block : GameData.getBlockRegistry()) {
    if (block instanceof IItemModelRegister) {
      ((IItemModelRegister)block).registerModel(Item.getItemFromBlock(block),getInstance());
    }
    if (block instanceof IStateMapperRegister) {
      ((IStateMapperRegister)block).registerStateMapper();
    }
  }
  for (  Item item : GameData.getItemRegistry()) {
    if (item instanceof IItemModelRegister) {
      ((IItemModelRegister)item).registerModel(item,getInstance());
    }
  }
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) public static void registerModels(){
  for (  Block block : GameData.getBlockRegistry()) {
    if (block instanceof IItemModelRegister) {
      ((IItemModelRegister)block).registerModel(Item.getItemFromBlock(block),getInstance());
    }
    if (block instanceof IStateMapperRegister) {
      ((IStateMapperRegister)block).registerStateMapper();
    }
  }
  for (  Item item : GameData.getItemRegistry()) {
    if (item instanceof IItemModelRegister) {
      ((IItemModelRegister)item).registerModel(item,getInstance());
    }
  }
}
Program: 63628
Project: 63628
Buggy source:
@Override public TextureAtlasSprite getSprite(short texUID){
  return null;
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public TextureAtlasSprite getSprite(short texUID){
  return null;
}
Program: 63629
Project: 63629
Buggy source:
@Override public void registerSprites(){
  String spriteName=getItemTexture();
  TextureMap textureMap=Minecraft.getMinecraft().getTextureMapBlocks();
  textureMap.setTextureEntry(spriteName,new TextureAtlasButterfly(spriteName));
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerSprites(){
  String spriteName=getItemTexture();
  TextureMap textureMap=Minecraft.getMinecraft().getTextureMapBlocks();
  textureMap.setTextureEntry(spriteName,new TextureAtlasButterfly(spriteName));
}
Program: 63630
Project: 63630
Buggy source:
/** 
 * Creates a new butterfly species. Automatically registered with AlleleManager.alleleRegistry.registerAllele() See IAlleleButterflySpeciesBuilder and IAlleleSpeciesBuilder for adding additional properties to the returned species.
 * @param uid Unique Identifier for this species
 * @param unlocalizedName Unlocalized name for this species
 * @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry.
 * @param unlocalizedDescription Unlocalized description for this species
 * @param modID The modID form the mod of the butterfly
 * @param texturePath String texture path for this butterfly e.g. "forestry:textures/entities/butterfly/..."
 * @param dominant Whether this species is genetically dominant (false means it is recessive)
 * @param branch Classification of this species
 * @param binomial Binomial name of the species sans genus. "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null.
 * @param serumColour The color of this butterfly's serum.
 * @return a new butterfly species allele.
 */
IAlleleButterflySpeciesBuilder createSpecies(String uid,String unlocalizedName,String authority,String unlocalizedDescription,String modID,String texturePath,boolean dominant,IClassification branch,String binomial,Color serumColour);

Fixed version (ground truth):
/** 
 * Creates a new butterfly species. Automatically registered with AlleleManager.alleleRegistry.registerAllele() See IAlleleButterflySpeciesBuilder and IAlleleSpeciesBuilder for adding additional properties to the returned species.
 * @param uid Unique Identifier for this species
 * @param unlocalizedName Unlocalized name for this species
 * @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry.
 * @param unlocalizedDescription Unlocalized description for this species
 * @param modID The modID form the mod of the butterfly
 * @param texturePath String texture path for this butterfly e.g. "forestry:butterfly/..."
 * @param dominant Whether this species is genetically dominant (false means it is recessive)
 * @param branch Classification of this species
 * @param binomial Binomial name of the species sans genus. "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null.
 * @param serumColour The color of this butterfly's serum.
 * @param cocoonProvider A IButterflyCocoonProvider for the butterfly
 * @return a new butterfly species allele.
 */
IAlleleButterflySpeciesBuilder createSpecies(String uid,String unlocalizedName,String authority,String unlocalizedDescription,String modID,String texturePath,boolean dominant,IClassification branch,String binomial,Color serumColour,IButterflyCocoonProvider cocoonProvider);
Program: 63631
Project: 63631
Buggy source:
private void harmEntities(IBeeGenome genome,IBeeHousing housing){
  List<EntityLivingBase> entities=getEntitiesInRange(genome,housing,EntityLivingBase.class);
  for (  EntityLivingBase entity : entities) {
    int damage=8;
    int count=BeeManager.armorApiaristHelper.wearsItems(entity,getUID(),true);
    damage-=(count * 2);
    if (damage <= 0) {
      continue;
    }
    entity.attackEntityFrom(damageSourceBeeRadioactive,damage);
  }
}

Fixed version (ground truth):
private void harmEntities(IBeeGenome genome,IBeeHousing housing){
  List<EntityLivingBase> entities=getEntitiesInRange(genome,housing,EntityLivingBase.class);
  for (  EntityLivingBase entity : entities) {
    int damage=8;
    int count=BeeManager.armorApiaristHelper.wearsItems(entity,getUID(),true);
    damage-=count * 2;
    if (damage <= 0) {
      continue;
    }
    entity.attackEntityFrom(damageSourceBeeRadioactive,damage);
  }
}
Program: 63632
Project: 63632
Buggy source:
@Override public boolean canReplace(World world,BlockPos pos){
  Block block=BlockUtil.getBlock(world,pos);
  Material material=block.getMaterial();
  return material.isReplaceable() && !material.isLiquid() || material == Material.air || material == Material.plants;
}

Fixed version (ground truth):
@Override public boolean canReplace(World world,BlockPos pos){
  Block block=BlockUtil.getBlock(world,pos);
  Material material=block.getMaterial();
  return block.isReplaceable(world,pos) && !material.isLiquid() || block.isAir(world,pos) || material == Material.plants;
}
Program: 63633
Project: 63633
Buggy source:
public BlockForestryLeaves(){
  super(Material.leaves,false);
  this.setCreativeTab(Tabs.tabArboriculture);
  setStepSound(soundTypeGrass);
}

Fixed version (ground truth):
public BlockForestryLeaves(){
  super(Material.leaves,false);
  setCreativeTab(Tabs.tabArboriculture);
  setStepSound(soundTypeGrass);
  setTickRandomly(true);
  setHardness(0.2F);
  setLightOpacity(1);
}
Program: 63634
Project: 63634
Buggy source:
private void matureCaterpillar(){
  maturationTime++;
  ITree tree=getTree();
  boolean wasDestroyed=isDestroyed(tree,damage);
  damage+=caterpillar.getGenome().getMetabolism();
  IButterflyGenome caterpillarGenome=caterpillar.getGenome();
  int caterpillarMatureTime=Math.round((float)caterpillarGenome.getLifespan() / (caterpillarGenome.getFertility() * 2));
  if (maturationTime >= caterpillarMatureTime && caterpillar.canTakeFlight(worldObj,getPos().getX(),getPos().getY(),getPos().getZ())) {
    if (worldObj.isAirBlock(getPos().add(-1,0,0))) {
      attemptButterflySpawn(worldObj,caterpillar,getPos().add(-1,0,0));
    }
 else     if (worldObj.isAirBlock(getPos().add(1,0,0))) {
      attemptButterflySpawn(worldObj,caterpillar,getPos().add(1,0,0));
    }
 else     if (worldObj.isAirBlock(getPos().add(0,0,-1))) {
      attemptButterflySpawn(worldObj,caterpillar,getPos().add(0,0,-1));
    }
 else     if (worldObj.isAirBlock(getPos().add(0,0,1))) {
      attemptButterflySpawn(worldObj,caterpillar,getPos().add(0,0,1));
    }
    setCaterpillar(null);
  }
 else   if (!wasDestroyed && isDestroyed(tree,damage)) {
    sendNetworkUpdate();
  }
}

Fixed version (ground truth):
private void matureCaterpillar(){
  maturationTime++;
  ITree tree=getTree();
  boolean wasDestroyed=isDestroyed(tree,damage);
  damage+=caterpillar.getGenome().getMetabolism();
  IButterflyGenome caterpillarGenome=caterpillar.getGenome();
  int caterpillarMatureTime=Math.round((float)caterpillarGenome.getLifespan() / (caterpillarGenome.getFertility() * 2));
  if (maturationTime >= caterpillarMatureTime) {
    ButterflyManager.butterflyRoot.plantCocoon(worldObj,this,getOwner());
    setCaterpillar(null);
  }
 else   if (!wasDestroyed && isDestroyed(tree,damage)) {
    sendNetworkUpdate();
  }
}
Program: 63635
Project: 63635
Buggy source:
@Override public void preInit(){
  MinecraftForge.EVENT_BUS.register(this);
  ButterflyBranchDefinition.createAlleles();
  AlleleButterflyEffect.createAlleles();
  blocks.lepidopterology.addDefinitions(BlockTypeLepidopterologyTesr.VALUES);
}

Fixed version (ground truth):
@Override public void preInit(){
  MinecraftForge.EVENT_BUS.register(this);
  ButterflyBranchDefinition.createAlleles();
  AlleleButterflyEffect.createAlleles();
  GameRegistry.registerTileEntity(TileCocoon.class,"String_Node_Str");
  proxy.preInitializeRendering();
  blocks.lepidopterology.addDefinitions(BlockTypeLepidopterologyTesr.VALUES);
}
Program: 63636
Project: 63636
Buggy source:
@Override public void doInit(){
  File configFile=new File(Forestry.instance.getConfigFolder(),CONFIG_CATEGORY + "String_Node_Str");
  loadConfig(configFile);
  PluginCore.rootCommand.addChildCommand(new CommandButterfly());
  EntityUtil.registerEntity(EntityButterfly.class,"String_Node_Str",0,0x000000,0xffffff,50,1,true);
  proxy.initializeRendering();
  MothDefinition.initMoths();
  ButterflyDefinition.initButterflies();
  blocks.lepidopterology.init();
  TreeManager.treeRoot.registerLeafTickHandler(new ButterflySpawner());
  RecipeSorter.register("String_Node_Str",MatingRecipe.class,RecipeSorter.Category.SHAPELESS,"String_Node_Str");
}

Fixed version (ground truth):
@Override public void doInit(){
  File configFile=new File(Forestry.instance.getConfigFolder(),CONFIG_CATEGORY + "String_Node_Str");
  loadConfig(configFile);
  PluginCore.rootCommand.addChildCommand(new CommandButterfly());
  EntityUtil.registerEntity(EntityButterfly.class,"String_Node_Str",0,0x000000,0xffffff,50,1,true);
  MothDefinition.initMoths();
  ButterflyDefinition.initButterflies();
  blocks.lepidopterology.init();
  TreeManager.treeRoot.registerLeafTickHandler(new ButterflySpawner());
  RecipeSorter.register("String_Node_Str",MatingRecipe.class,RecipeSorter.Category.SHAPELESS,"String_Node_Str");
}
Program: 63637
Project: 63637
Buggy source:
public BlockRegistryLepidopterology(){
  lepidopterology=registerBlock(new BlockLepidopterology(),ItemBlockForestry.class,"String_Node_Str");
}

Fixed version (ground truth):
public BlockRegistryLepidopterology(){
  lepidopterology=registerBlock(new BlockLepidopterology(),ItemBlockForestry.class,"String_Node_Str");
  cocoon=registerBlock(new BlockCocoon(),ItemBlockForestry.class,"String_Node_Str");
}
Program: 63638
Project: 63638
Buggy source:
@Override public IBakedModel handleBlockState(IBlockState state){
  IModelBaker baker=ModelBaker.getInstance();
  Block block=state.getBlock();
  if (!blockClass.isInstance(block)) {
    return null;
  }
  BlockDecorativeLeaves bBlock=blockClass.cast(block);
  TreeDefinition tree=state.getValue(bBlock.getVariant());
  baker.setRenderBoundsFromBlock(block);
  bakeBlock(bBlock,tree,baker);
  return latestBlockModel=baker.bakeModel(false);
}

Fixed version (ground truth):
@Override public IBakedModel handleBlockState(IBlockState state){
  IModelBaker baker=new ModelBaker();
  Block block=state.getBlock();
  if (!blockClass.isInstance(block)) {
    return null;
  }
  BlockDecorativeLeaves bBlock=blockClass.cast(block);
  TreeDefinition tree=state.getValue(bBlock.getVariant());
  baker.setRenderBoundsFromBlock(block);
  bakeBlock(bBlock,tree,baker);
  return latestBlockModel=baker.bakeModel(false);
}
Program: 63639
Project: 63639
Buggy source:
public static boolean bakeBlock(BlockDecorativeLeaves block,TreeDefinition treeDefinition,IModelBaker baker){
  if (treeDefinition == null) {
    return false;
  }
  ITreeGenome genome=treeDefinition.getGenome();
  IAlleleTreeSpecies species=genome.getPrimary();
  ILeafSpriteProvider leafSpriteProvider=species.getLeafSpriteProvider();
  TextureAtlasSprite leaveSprite=leafSpriteProvider.getSprite(false,Proxies.render.fancyGraphicsEnabled());
  baker.addBlockModel(block,null,leaveSprite,0);
  TextureAtlasSprite fruitSprite=TextureManager.getInstance().getSprite(genome.getFruitProvider().getDecorativeSpriteIndex());
  if (fruitSprite != null) {
    baker.addBlockModel(block,null,fruitSprite,1);
  }
  baker.getCurrentModel().setParticleSprite(leaveSprite);
  return true;
}

Fixed version (ground truth):
public static boolean bakeBlock(BlockDecorativeLeaves block,TreeDefinition treeDefinition,IModelBaker baker){
  if (treeDefinition == null) {
    return false;
  }
  ITreeGenome genome=treeDefinition.getGenome();
  IAlleleTreeSpecies species=genome.getPrimary();
  ILeafSpriteProvider leafSpriteProvider=species.getLeafSpriteProvider();
  TextureAtlasSprite leaveSprite=leafSpriteProvider.getSprite(false,Proxies.render.fancyGraphicsEnabled());
  baker.addBlockModel(block,null,leaveSprite,0);
  TextureAtlasSprite fruitSprite=TextureManager.getInstance().getSprite(genome.getFruitProvider().getDecorativeSpriteIndex());
  if (fruitSprite != null) {
    baker.addBlockModel(block,null,fruitSprite,1);
  }
  baker.setParticleSprite(leaveSprite);
  return true;
}
Program: 63640
Project: 63640
Buggy source:
@Override public IBakedModel handleItemState(ItemStack stack){
  IModelBaker baker=ModelBaker.getInstance();
  Block block=Block.getBlockFromItem(stack.getItem());
  if (!blockClass.isInstance(block)) {
    return null;
  }
  BlockDecorativeLeaves bBlock=blockClass.cast(block);
  TreeDefinition tree=bBlock.getTreeType(stack.getMetadata());
  block.setBlockBoundsForItemRender();
  baker.setRenderBoundsFromBlock(block);
  bakeBlock(bBlock,tree,baker);
  return latestItemModel=baker.bakeModel(true);
}

Fixed version (ground truth):
@Override public IBakedModel handleItemState(ItemStack stack){
  IModelBaker baker=new ModelBaker();
  Block block=Block.getBlockFromItem(stack.getItem());
  if (!blockClass.isInstance(block)) {
    return null;
  }
  BlockDecorativeLeaves bBlock=blockClass.cast(block);
  TreeDefinition tree=bBlock.getTreeType(stack.getMetadata());
  block.setBlockBoundsForItemRender();
  baker.setRenderBoundsFromBlock(block);
  bakeBlock(bBlock,tree,baker);
  return latestItemModel=baker.bakeModel(true);
}
Program: 63641
Project: 63641
Buggy source:
@Override public boolean bakeWorldBlock(BlockForestryLeaves block,IBlockAccess world,BlockPos pos,IModelBaker baker){
  TileLeaves tile=TileUtil.getTile(world,pos,TileLeaves.class);
  if (tile == null) {
    return false;
  }
  TextureAtlasSprite leaveSprite=tile.getLeaveSprite(Proxies.render.fancyGraphicsEnabled());
  baker.addBlockModel(block,pos,leaveSprite,0);
  TextureAtlasSprite fruitSprite=tile.getFruitSprite();
  if (fruitSprite != null) {
    baker.addBlockModel(block,pos,fruitSprite,1);
  }
  baker.getCurrentModel().setParticleSprite(leaveSprite);
  return true;
}

Fixed version (ground truth):
@Override public boolean bakeWorldBlock(BlockForestryLeaves block,IBlockAccess world,BlockPos pos,IModelBaker baker){
  TileLeaves tile=TileUtil.getTile(world,pos,TileLeaves.class);
  if (tile == null) {
    return false;
  }
  TextureAtlasSprite leaveSprite=tile.getLeaveSprite(Proxies.render.fancyGraphicsEnabled());
  baker.addBlockModel(block,pos,leaveSprite,0);
  TextureAtlasSprite fruitSprite=tile.getFruitSprite();
  if (fruitSprite != null) {
    baker.addBlockModel(block,pos,fruitSprite,1);
  }
  baker.setParticleSprite(leaveSprite);
  return true;
}
Program: 63642
Project: 63642
Buggy source:
@Override public void setupAPI(){
  ChipsetManager.solderManager=new SolderManager();
  ChipsetManager.circuitRegistry=new CircuitRegistry();
  AlleleRegistry alleleRegistry=new AlleleRegistry();
  AlleleManager.alleleRegistry=alleleRegistry;
  AlleleManager.climateHelper=new ClimateUtil();
  AlleleManager.alleleFactory=new AlleleFactory();
  alleleRegistry.initialize();
  AlleleHelper.instance=new AlleleHelper();
  MultiblockManager.logicFactory=new MultiblockLogicFactory();
  ModelBaker.getInstance();
}

Fixed version (ground truth):
@Override public void setupAPI(){
  ChipsetManager.solderManager=new SolderManager();
  ChipsetManager.circuitRegistry=new CircuitRegistry();
  AlleleRegistry alleleRegistry=new AlleleRegistry();
  AlleleManager.alleleRegistry=alleleRegistry;
  AlleleManager.climateHelper=new ClimateUtil();
  AlleleManager.alleleFactory=new AlleleFactory();
  alleleRegistry.initialize();
  AlleleHelper.instance=new AlleleHelper();
  MultiblockManager.logicFactory=new MultiblockLogicFactory();
}
Program: 63643
Project: 63643
Buggy source:
@Override public IBakedModel handleBlockState(IBlockState state){
  IModelBaker baker=ModelBaker.getInstance();
  IExtendedBlockState stateExtended=(IExtendedBlockState)state;
  IBlockAccess world=stateExtended.getValue(UnlistedBlockAccess.BLOCKACCESS);
  BlockPos pos=stateExtended.getValue(UnlistedBlockPos.POS);
  Block block=state.getBlock();
  if (!blockClass.isInstance(block)) {
    return null;
  }
  B bBlock=blockClass.cast(block);
  baker.setRenderBoundsFromBlock(block);
  bakeWorldBlock(bBlock,world,pos,baker);
  return latestBlockModel=baker.bakeModel(false);
}

Fixed version (ground truth):
@Override public IBakedModel handleBlockState(IBlockState state){
  IModelBaker baker=new ModelBaker();
  IExtendedBlockState stateExtended=(IExtendedBlockState)state;
  IBlockAccess world=stateExtended.getValue(UnlistedBlockAccess.BLOCKACCESS);
  BlockPos pos=stateExtended.getValue(UnlistedBlockPos.POS);
  Block block=state.getBlock();
  if (!blockClass.isInstance(block)) {
    return null;
  }
  B bBlock=blockClass.cast(block);
  baker.setRenderBoundsFromBlock(block);
  bakeWorldBlock(bBlock,world,pos,baker);
  return latestBlockModel=baker.bakeModel(false);
}