nus-yam/ex-repair huggingface dataset:
Program: 63644
Project: 63644
Buggy source:
@Override public IBakedModel handleItemState(ItemStack stack){
  IModelBaker baker=ModelBaker.getInstance();
  Block block=Block.getBlockFromItem(stack.getItem());
  if (!blockClass.isInstance(block)) {
    return null;
  }
  B bBlock=blockClass.cast(block);
  block.setBlockBoundsForItemRender();
  baker.setRenderBoundsFromBlock(block);
  try {
    bakeInventoryBlock(bBlock,stack,baker);
  }
 catch (  RuntimeException e) {
    return null;
  }
  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;
  }
  B bBlock=blockClass.cast(block);
  block.setBlockBoundsForItemRender();
  baker.setRenderBoundsFromBlock(block);
  bakeInventoryBlock(bBlock,stack,baker);
  return latestItemModel=baker.bakeModel(true);
}
Program: 63645
Project: 63645
Buggy source:
protected float[] getFaceUvs(final EnumFacing face,final Vector3f to_16,final Vector3f from_16){
  float from_a=0;
  float from_b=0;
  float to_a=0;
  float to_b=0;
switch (face) {
case UP:
    from_a=from_16.x / 16.0f;
  from_b=from_16.z / 16.0f;
to_a=to_16.x / 16.0f;
to_b=to_16.z / 16.0f;
break;
case DOWN:
from_a=from_16.x / 16.0f;
from_b=from_16.z / 16.0f;
to_a=to_16.x / 16.0f;
to_b=to_16.z / 16.0f;
break;
case SOUTH:
from_a=from_16.x / 16.0f;
from_b=from_16.y / 16.0f;
to_a=to_16.x / 16.0f;
to_b=to_16.y / 16.0f;
break;
case NORTH:
from_a=from_16.x / 16.0f;
from_b=from_16.y / 16.0f;
to_a=to_16.x / 16.0f;
to_b=to_16.y / 16.0f;
break;
case EAST:
from_a=from_16.y / 16.0f;
from_b=from_16.z / 16.0f;
to_a=to_16.y / 16.0f;
to_b=to_16.z / 16.0f;
break;
case WEST:
from_a=from_16.y / 16.0f;
from_b=from_16.z / 16.0f;
to_a=to_16.y / 16.0f;
to_b=to_16.z / 16.0f;
break;
default :
}
from_a=1.0f - from_a;
from_b=1.0f - from_b;
to_a=1.0f - to_a;
to_b=1.0f - to_b;
final float[] afloat=new float[]{16.0f * (quadsUV[0] + quadsUV[2] * from_a + quadsUV[4] * from_b),16.0f * (quadsUV[1] + quadsUV[3] * from_a + quadsUV[5] * from_b),16.0f * (quadsUV[0] + quadsUV[2] * to_a + quadsUV[4] * from_b),16.0f * (quadsUV[1] + quadsUV[3] * to_a + quadsUV[5] * from_b),16.0f * (quadsUV[0] + quadsUV[2] * to_a + quadsUV[4] * to_b),16.0f * (quadsUV[1] + quadsUV[3] * to_a + quadsUV[5] * to_b),16.0f * (quadsUV[0] + quadsUV[2] * from_a + quadsUV[4] * to_b),16.0f * (quadsUV[1] + quadsUV[3] * from_a + quadsUV[5] * to_b)};
return afloat;
}

Fixed version (ground truth):
protected float[] getFaceUvs(final EnumFacing face,final Vector3f to_16,final Vector3f from_16){
  float from_a=0;
  float from_b=0;
  float to_a=0;
  float to_b=0;
switch (face) {
case UP:
    from_a=from_16.x / 16.0f;
  from_b=from_16.z / 16.0f;
to_a=to_16.x / 16.0f;
to_b=to_16.z / 16.0f;
break;
case DOWN:
from_a=from_16.x / 16.0f;
from_b=from_16.z / 16.0f;
to_a=to_16.x / 16.0f;
to_b=to_16.z / 16.0f;
break;
case SOUTH:
from_a=from_16.x / 16.0f;
from_b=from_16.y / 16.0f;
to_a=to_16.x / 16.0f;
to_b=to_16.y / 16.0f;
break;
case NORTH:
from_a=from_16.x / 16.0f;
from_b=from_16.y / 16.0f;
to_a=to_16.x / 16.0f;
to_b=to_16.y / 16.0f;
break;
case EAST:
from_a=from_16.y / 16.0f;
from_b=from_16.z / 16.0f;
to_a=to_16.y / 16.0f;
to_b=to_16.z / 16.0f;
break;
case WEST:
from_a=from_16.y / 16.0f;
from_b=from_16.z / 16.0f;
to_a=to_16.y / 16.0f;
to_b=to_16.z / 16.0f;
break;
default :
}
from_a=1.0f - from_a;
from_b=1.0f - from_b;
to_a=1.0f - to_a;
to_b=1.0f - to_b;
return new float[]{16.0f * (quadsUV[0] + quadsUV[2] * from_a + quadsUV[4] * from_b),16.0f * (quadsUV[1] + quadsUV[3] * from_a + quadsUV[5] * from_b),16.0f * (quadsUV[0] + quadsUV[2] * to_a + quadsUV[4] * from_b),16.0f * (quadsUV[1] + quadsUV[3] * to_a + quadsUV[5] * from_b),16.0f * (quadsUV[0] + quadsUV[2] * to_a + quadsUV[4] * to_b),16.0f * (quadsUV[1] + quadsUV[3] * to_a + quadsUV[5] * to_b),16.0f * (quadsUV[0] + quadsUV[2] * from_a + quadsUV[4] * to_b),16.0f * (quadsUV[1] + quadsUV[3] * from_a + quadsUV[5] * to_b)};
}
Program: 63646
Project: 63646
Buggy source:
@Override public IModelBakerModel bakeModel(boolean flip){
  ModelRotation mr=ModelRotation.X0_Y0;
  if (flip)   mr=ModelRotation.X0_Y180;
  for (  ModelBakerFace face : new ArrayList<>(faces)) {
    final EnumFacing myFace=face.face;
    final float[] uvs=getFaceUvs(myFace,face.from,face.to);
    final BlockFaceUV uv=new BlockFaceUV(uvs,0);
    final BlockPartFace bpf=new BlockPartFace(myFace,face.colorIndex,"String_Node_Str",uv);
    BakedQuad bf=faceBakery.makeBakedQuad(face.to,face.from,bpf,face.spite,myFace,mr,null,true,true);
    bf=new IColoredBakedQuad.ColoredBakedQuad(bf.getVertexData(),face.colorIndex,bf.getFace());
    if (face.isEdge)     this.currentModel.getFaceQuads(myFace).add(bf);
 else     this.currentModel.getGeneralQuads().add(bf);
  }
  return clear();
}

Fixed version (ground truth):
@Override public IModelBakerModel bakeModel(boolean flip){
  ModelRotation mr=ModelRotation.X0_Y0;
  if (flip)   mr=ModelRotation.X0_Y180;
  for (  ModelBakerFace face : faces) {
    final EnumFacing myFace=face.face;
    final float[] uvs=getFaceUvs(myFace,face.from,face.to);
    final BlockFaceUV uv=new BlockFaceUV(uvs,0);
    final BlockPartFace bpf=new BlockPartFace(myFace,face.colorIndex,"String_Node_Str",uv);
    BakedQuad bf=faceBakery.makeBakedQuad(face.to,face.from,bpf,face.spite,myFace,mr,null,true,true);
    bf=new IColoredBakedQuad.ColoredBakedQuad(bf.getVertexData(),face.colorIndex,bf.getFace());
    if (face.isEdge)     this.currentModel.getFaceQuads(myFace).add(bf);
 else     this.currentModel.getGeneralQuads().add(bf);
  }
  return currentModel;
}
Program: 63647
Project: 63647
Buggy source:
@Override public boolean bakeWorldBlock(BlockFarm blockFarm,IBlockAccess world,BlockPos pos,IModelBaker baker){
  TileFarm farm=(TileFarm)world.getTileEntity(pos);
  TextureAtlasSprite[] textures=getSprites(farm.getFarmBlockTexture());
  baker.addBlockModel(blockFarm,pos,textures,0);
  baker.addBlockModel(blockFarm,pos,getOverlaySprites(farm.getFarmBlockType()),0);
  baker.getCurrentModel().setParticleSprite(textures[0]);
  return true;
}

Fixed version (ground truth):
@Override public boolean bakeWorldBlock(BlockFarm blockFarm,IBlockAccess world,BlockPos pos,IModelBaker baker){
  TileFarm farm=(TileFarm)world.getTileEntity(pos);
  TextureAtlasSprite[] textures=getSprites(farm.getFarmBlockTexture());
  baker.addBlockModel(blockFarm,pos,textures,0);
  baker.addBlockModel(blockFarm,pos,getOverlaySprites(farm.getFarmBlockType()),0);
  baker.setParticleSprite(textures[0]);
  return true;
}
Program: 63648
Project: 63648
Buggy source:
@Override public ModelResourceLocation getModelLocation(ItemStack stack){
  int meta=stack.getMetadata();
  EnumWoodType woodType=wood.getWoodType(meta);
  String blockKind=wood.getBlockKind().replace('.','/');
  return ModelManager.getInstance().getModelLocation(blockKind + "String_Node_Str" + woodType);
}

Fixed version (ground truth):
@Override public ModelResourceLocation getModelLocation(ItemStack stack){
  int meta=stack.getMetadata();
  EnumWoodType woodType=wood.getWoodType(meta);
  String blockKind=wood.getBlockKind();
  return ModelManager.getInstance().getModelLocation(blockKind + "String_Node_Str" + woodType);
}
Program: 63649
Project: 63649
Buggy source:
public static ResourceLocation[] getResourceLocations(IWoodTyped typed){
  List<ResourceLocation> resourceLocations=new ArrayList<>();
  for (  EnumWoodType woodType : typed.getWoodTypes()) {
    String blockKind=typed.getBlockKind().replace('.','/');
    ResourceLocation resourceLocation=new ForestryResource(blockKind + "String_Node_Str" + woodType);
    resourceLocations.add(resourceLocation);
  }
  return resourceLocations.toArray(new ResourceLocation[resourceLocations.size()]);
}

Fixed version (ground truth):
public static ResourceLocation[] getResourceLocations(IWoodTyped typed){
  List<ResourceLocation> resourceLocations=new ArrayList<>();
  for (  EnumWoodType woodType : typed.getWoodTypes()) {
    String blockKind=typed.getBlockKind();
    ResourceLocation resourceLocation=new ForestryResource(blockKind + "String_Node_Str" + woodType);
    resourceLocations.add(resourceLocation);
  }
  return resourceLocations.toArray(new ResourceLocation[resourceLocations.size()]);
}
Program: 63650
Project: 63650
Buggy source:
@Nonnull @Override public String getBlockKind(){
  return isDouble() ? "String_Node_Str" : "String_Node_Str";
}

Fixed version (ground truth):
@Nonnull @Override public String getBlockKind(){
  return "String_Node_Str";
}
Program: 63651
Project: 63651
Buggy source:
@Override public void registerStateMapper(){
  Proxies.render.registerStateMapper(this,new WoodTypeStateMapper(this,getVariant()));
}

Fixed version (ground truth):
@Override public void registerStateMapper(){
  String blockPath=isDouble() ? "String_Node_Str" : "String_Node_Str";
  Proxies.render.registerStateMapper(this,new WoodTypeStateMapper(this,blockPath,getVariant()));
}
Program: 63652
Project: 63652
Buggy source:
@Override protected ModelResourceLocation getModelResourceLocation(IBlockState state){
  final Map<IProperty,Comparable> properties;
  if (propertyWoodType != null) {
    properties=Maps.newLinkedHashMap(state.getProperties());
    properties.remove(propertyWoodType);
  }
 else {
    properties=state.getProperties();
  }
  Block block=state.getBlock();
  int meta=block.getMetaFromState(state);
  EnumWoodType woodType=woodTyped.getWoodType(meta);
  String resourceDomain=Block.blockRegistry.getNameForObject(block).getResourceDomain();
  String blockKind=woodTyped.getBlockKind().replace('.','/');
  String resourceLocation="String_Node_Str" + blockKind + '/'+ woodType;
  String propertyString=this.getPropertyString(properties);
  return new ModelResourceLocation(resourceDomain + ':' + resourceLocation,propertyString);
}

Fixed version (ground truth):
@Override protected ModelResourceLocation getModelResourceLocation(IBlockState state){
  final Map<IProperty,Comparable> properties;
  if (propertyWoodType != null) {
    properties=Maps.newLinkedHashMap(state.getProperties());
    properties.remove(propertyWoodType);
  }
 else {
    properties=state.getProperties();
  }
  Block block=state.getBlock();
  int meta=block.getMetaFromState(state);
  EnumWoodType woodType=woodTyped.getWoodType(meta);
  String resourceDomain=Block.blockRegistry.getNameForObject(block).getResourceDomain();
  String resourceLocation="String_Node_Str" + blockPath + '/'+ woodType;
  String propertyString=this.getPropertyString(properties);
  return new ModelResourceLocation(resourceDomain + ':' + resourceLocation,propertyString);
}
Program: 63653
Project: 63653
Buggy source:
public WoodTypeStateMapper(@Nonnull IWoodTyped woodTyped,@Nullable PropertyWoodType propertyWoodType){
  this.woodTyped=woodTyped;
  this.propertyWoodType=propertyWoodType;
}

Fixed version (ground truth):
public WoodTypeStateMapper(@Nonnull IWoodTyped woodTyped,@Nonnull String blockPath,@Nullable PropertyWoodType propertyWoodType){
  this.woodTyped=woodTyped;
  this.blockPath=blockPath;
  this.propertyWoodType=propertyWoodType;
}
Program: 63654
Project: 63654
Buggy source:
@Override public int getMetaFromState(IBlockState state){
  return ((Type)state.getValue(TYPE)).ordinal();
}

Fixed version (ground truth):
@Override public int getMetaFromState(IBlockState state){
  return ((AlvearyType)state.getValue(TYPE)).ordinal();
}
Program: 63655
Project: 63655
Buggy source:
public BlockAlveary(){
  super(new MaterialBeehive(false));
  setHardness(1.0f);
  setCreativeTab(Tabs.tabApiculture);
  setHarvestLevel("String_Node_Str",0);
  setDefaultState(this.blockState.getBaseState().withProperty(TYPE,Type.PLAIN).withProperty(STATE,State.OFF).withProperty(LEVEL,Level.BOTTOM));
}

Fixed version (ground truth):
public BlockAlveary(){
  super(new MaterialBeehive(false));
  setHardness(1.0f);
  setCreativeTab(Tabs.tabApiculture);
  setHarvestLevel("String_Node_Str",0);
  setStepSound(soundTypeWood);
  setDefaultState(this.blockState.getBaseState().withProperty(TYPE,AlvearyType.PLAIN).withProperty(STATE,State.OFF).withProperty(LEVEL,AlvearyLevel.MIDDLE));
}
Program: 63656
Project: 63656
Buggy source:
@Override protected ModelResourceLocation getModelResourceLocation(IBlockState state){
  LinkedHashMap linkedhashmap=Maps.newLinkedHashMap(state.getProperties());
  if (linkedhashmap.get(TYPE) != Type.PLAIN) {
    linkedhashmap.remove(LEVEL);
  }
  if (linkedhashmap.get(TYPE) == Type.SIEVE || linkedhashmap.get(TYPE) == Type.ENTRANCE || linkedhashmap.get(TYPE) == Type.STABILISER || linkedhashmap.get(TYPE) == Type.HYGRO || linkedhashmap.get(TYPE) == Type.PLAIN) {
    linkedhashmap.remove(STATE);
  }
  String s=String.format("String_Node_Str",Block.blockRegistry.getNameForObject(state.getBlock()).getResourceDomain(),"String_Node_Str" + TYPE.getName((Enum)linkedhashmap.remove(TYPE)));
  ;
  return new ModelResourceLocation(s,this.getPropertyString(linkedhashmap));
}

Fixed version (ground truth):
@Override protected ModelResourceLocation getModelResourceLocation(IBlockState state){
  LinkedHashMap linkedhashmap=Maps.newLinkedHashMap(state.getProperties());
  if (linkedhashmap.get(TYPE) != AlvearyType.PLAIN) {
    linkedhashmap.remove(LEVEL);
  }
  if (linkedhashmap.get(TYPE) == AlvearyType.SIEVE || linkedhashmap.get(TYPE) == AlvearyType.ENTRANCE || linkedhashmap.get(TYPE) == AlvearyType.STABILISER || linkedhashmap.get(TYPE) == AlvearyType.HYGRO || linkedhashmap.get(TYPE) == AlvearyType.PLAIN) {
    linkedhashmap.remove(STATE);
  }
  String s=String.format("String_Node_Str",Block.blockRegistry.getNameForObject(state.getBlock()).getResourceDomain(),"String_Node_Str" + TYPE.getName((Enum)linkedhashmap.remove(TYPE)));
  ;
  return new ModelResourceLocation(s,this.getPropertyString(linkedhashmap));
}
Program: 63658
Project: 63658
Buggy source:
@Override public TileEntity createTileEntity(World world,IBlockState state){
  int metadata=getMetaFromState(state);
  if (metadata < 0 || metadata > Type.VALUES.length) {
    return null;
  }
  Type type=Type.VALUES[metadata];
switch (type) {
case SWARMER:
    return new TileAlvearySwarmer();
case FAN:
  return new TileAlvearyFan();
case HEATER:
return new TileAlvearyHeater();
case HYGRO:
return new TileAlvearyHygroregulator();
case STABILISER:
return new TileAlvearyStabiliser();
case SIEVE:
return new TileAlvearySieve();
case PLAIN:
default :
return new TileAlvearyPlain();
}
}

Fixed version (ground truth):
@Override public TileEntity createTileEntity(World world,IBlockState state){
  int metadata=getMetaFromState(state);
  if (metadata < 0 || metadata > AlvearyType.VALUES.length) {
    return null;
  }
  AlvearyType type=AlvearyType.VALUES[metadata];
switch (type) {
case SWARMER:
    return new TileAlvearySwarmer();
case FAN:
  return new TileAlvearyFan();
case HEATER:
return new TileAlvearyHeater();
case HYGRO:
return new TileAlvearyHygroregulator();
case STABILISER:
return new TileAlvearyStabiliser();
case SIEVE:
return new TileAlvearySieve();
case PLAIN:
default :
return new TileAlvearyPlain();
}
}
Program: 63659
Project: 63659
Buggy source:
public ItemStack get(Type type){
  return new ItemStack(this,1,type.ordinal());
}

Fixed version (ground truth):
public ItemStack get(AlvearyType type){
  return new ItemStack(this,1,type.ordinal());
}
Program: 63660
Project: 63660
Buggy source:
@Override public IBlockState getStateFromMeta(int meta){
  return getDefaultState().withProperty(TYPE,Type.values()[meta]);
}

Fixed version (ground truth):
@Override public IBlockState getStateFromMeta(int meta){
  return getDefaultState().withProperty(TYPE,AlvearyType.values()[meta]);
}
Program: 63661
Project: 63661
Buggy source:
@SideOnly(Side.CLIENT) @Override public void registerModel(Item item,IModelManager manager){
  manager.registerItemModel(item,0,"String_Node_Str");
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public void registerModel(Item item,IModelManager manager){
  manager.registerItemModel(item,0,"String_Node_Str");
  manager.registerItemModel(item,1,"String_Node_Str");
}
Program: 63662
Project: 63662
Buggy source:
@Override public int colorMultiplier(IBlockAccess worldIn,BlockPos pos,int renderPass){
  if (renderPass < 3) {
    return ((TileCandle)worldIn.getTileEntity(pos)).getColour();
  }
  return 16777215;
}

Fixed version (ground truth):
@Override public int colorMultiplier(IBlockAccess worldIn,BlockPos pos,int renderPass){
  return ((TileCandle)worldIn.getTileEntity(pos)).getColour();
}
Program: 63663
Project: 63663
Buggy source:
@Override @SideOnly(Side.CLIENT) public int getColorFromItemStack(ItemStack stack,int pass){
  int value=0xffffff;
  if (pass == 1 && stack.hasTagCompound()) {
    NBTTagCompound tag=stack.getTagCompound();
    if (tag.hasKey("String_Node_Str")) {
      value=tag.getInteger("String_Node_Str");
    }
  }
  return value;
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public int getColorFromItemStack(ItemStack stack,int pass){
  int value=0xffffff;
  if (pass == 1 && stack.hasTagCompound()) {
    NBTTagCompound tag=stack.getTagCompound();
    if (tag.hasKey(BlockCandle.colourTagName)) {
      value=tag.getInteger(BlockCandle.colourTagName);
    }
  }
  return value;
}
Program: 63664
Project: 63664
Buggy source:
protected TileAlveary(BlockAlveary.Type type){
  super(new MultiblockLogicAlveary());
  this.unlocalizedTitle="String_Node_Str" + type.ordinal() + "String_Node_Str";
}

Fixed version (ground truth):
protected TileAlveary(BlockAlveary.AlvearyType type){
  super(new MultiblockLogicAlveary());
  this.unlocalizedTitle="String_Node_Str" + type.ordinal() + "String_Node_Str";
}
Program: 63665
Project: 63665
Buggy source:
public TileAlvearyHygroregulator(){
  super(BlockAlveary.Type.HYGRO);
  this.inventory=new InventoryHygroregulator(this);
  Fluid water=Fluids.WATER.getFluid();
  Fluid lava=Fluids.LAVA.getFluid();
  Fluid liquidIce=Fluids.ICE.getFluid();
  this.liquidTank=new FilteredTank(Constants.PROCESSOR_TANK_CAPACITY,water,lava,liquidIce);
  this.tankManager=new TankManager(this,liquidTank);
  this.recipes=new HygroregulatorRecipe[]{new HygroregulatorRecipe(new FluidStack(water,1),1,0.01f,-0.005f),new HygroregulatorRecipe(new FluidStack(lava,1),10,-0.01f,+0.005f),new HygroregulatorRecipe(new FluidStack(liquidIce,1),10,0.02f,-0.01f)};
}

Fixed version (ground truth):
public TileAlvearyHygroregulator(){
  super(BlockAlveary.AlvearyType.HYGRO);
  this.inventory=new InventoryHygroregulator(this);
  Fluid water=Fluids.WATER.getFluid();
  Fluid lava=Fluids.LAVA.getFluid();
  Fluid liquidIce=Fluids.ICE.getFluid();
  this.liquidTank=new FilteredTank(Constants.PROCESSOR_TANK_CAPACITY,water,lava,liquidIce);
  this.tankManager=new TankManager(this,liquidTank);
  this.recipes=new HygroregulatorRecipe[]{new HygroregulatorRecipe(new FluidStack(water,1),1,0.01f,-0.005f),new HygroregulatorRecipe(new FluidStack(lava,1),10,-0.01f,+0.005f),new HygroregulatorRecipe(new FluidStack(liquidIce,1),10,0.02f,-0.01f)};
}
Program: 63666
Project: 63666
Buggy source:
@Override public void onMachineBroken(){
  super.onMachineBroken();
  if (!worldObj.isRemote) {
    this.worldObj.setBlockState(getPos(),getBlockType().getStateFromMeta(BlockAlveary.Type.PLAIN.ordinal()),2);
  }
}

Fixed version (ground truth):
@Override public void onMachineBroken(){
  super.onMachineBroken();
  if (!worldObj.isRemote) {
    this.worldObj.setBlockState(getPos(),getBlockType().getStateFromMeta(BlockAlveary.AlvearyType.PLAIN.ordinal()),2);
  }
}
Program: 63667
Project: 63667
Buggy source:
@Override public void onMachineAssembled(IMultiblockController multiblockController,BlockPos minCoord,BlockPos maxCoord){
  super.onMachineAssembled(multiblockController,minCoord,maxCoord);
  if (!worldObj.isRemote) {
    if (getPos().getY() == maxCoord.getY()) {
      if ((getPos().getX() > minCoord.getX() && getPos().getX() < maxCoord.getX()) || (getPos().getZ() > minCoord.getZ() && getPos().getZ() < maxCoord.getZ())) {
        this.worldObj.setBlockState(getPos(),getBlockType().getStateFromMeta(BlockAlveary.Type.ENTRANCE.ordinal()),2);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onMachineAssembled(IMultiblockController multiblockController,BlockPos minCoord,BlockPos maxCoord){
  super.onMachineAssembled(multiblockController,minCoord,maxCoord);
  if (!worldObj.isRemote) {
    if (getPos().getY() == maxCoord.getY()) {
      if ((getPos().getX() > minCoord.getX() && getPos().getX() < maxCoord.getX()) || (getPos().getZ() > minCoord.getZ() && getPos().getZ() < maxCoord.getZ())) {
        this.worldObj.setBlockState(getPos(),getBlockType().getStateFromMeta(BlockAlveary.AlvearyType.ENTRANCE.ordinal()),2);
      }
    }
  }
}
Program: 63668
Project: 63668
Buggy source:
public TileAlvearySieve(){
  super(BlockAlveary.Type.SIEVE);
  this.inventory=new InventoryAlvearySieve(this);
  this.beeListener=new AlvearySieveBeeListener(inventory);
}

Fixed version (ground truth):
public TileAlvearySieve(){
  super(BlockAlveary.AlvearyType.SIEVE);
  this.inventory=new InventoryAlvearySieve(this);
  this.beeListener=new AlvearySieveBeeListener(inventory);
}
Program: 63669
Project: 63669
Buggy source:
public TileAlvearySwarmer(){
  super(BlockAlveary.Type.SWARMER);
  this.inventory=new InventorySwarmer(this);
}

Fixed version (ground truth):
public TileAlvearySwarmer(){
  super(BlockAlveary.AlvearyType.SWARMER);
  this.inventory=new InventorySwarmer(this);
}
Program: 63670
Project: 63670
Buggy source:
@SideOnly(Side.CLIENT) @Override public int colorMultiplier(IBlockAccess world,BlockPos pos,int renderPass){
  TileLeaves leaves=getLeafTile(world,pos);
  if (leaves == null) {
    return super.colorMultiplier(world,pos);
  }
  int colour=leaves.getFoliageColour(Proxies.common.getClientInstance().thePlayer);
  if (colour == PluginArboriculture.proxy.getFoliageColorBasic()) {
    colour=super.colorMultiplier(world,pos);
  }
  return colour;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public int colorMultiplier(IBlockAccess world,BlockPos pos,int renderPass){
  TileLeaves leaves=getLeafTile(world,pos);
  if (leaves == null) {
    return super.colorMultiplier(world,pos,0);
  }
  int colour=super.colorMultiplier(world,pos,0);
  if (renderPass == 0) {
    colour=leaves.getFoliageColour(Proxies.common.getClientInstance().thePlayer);
    if (colour == PluginArboriculture.proxy.getFoliageColorBasic()) {
      return super.colorMultiplier(world,pos,0);
    }
  }
 else {
    colour=leaves.getFruitColour();
  }
  return colour;
}
Program: 63671
Project: 63671
Buggy source:
@Override public int getColorFromItemStack(ItemStack itemStack,int renderPass){
  if (!itemStack.hasTagCompound()) {
    return PluginArboriculture.proxy.getFoliageColorBasic();
  }
  TileLeaves tileLeaves=new TileLeaves();
  tileLeaves.readFromNBT(itemStack.getTagCompound());
  return tileLeaves.getFoliageColour(Proxies.common.getPlayer());
}

Fixed version (ground truth):
@Override public int getColorFromItemStack(ItemStack itemStack,int renderPass){
  if (!itemStack.hasTagCompound()) {
    return PluginArboriculture.proxy.getFoliageColorBasic();
  }
  TileLeaves tileLeaves=new TileLeaves();
  tileLeaves.readFromNBT(itemStack.getTagCompound());
  if (renderPass == 1) {
    return tileLeaves.getFruitColour();
  }
 else {
    return tileLeaves.getFoliageColour(Proxies.common.getPlayer());
  }
}
Program: 63672
Project: 63672
Buggy source:
public ApiaristTracker(String s,GameProfile player,World world){
  super(s,player,world);
}

Fixed version (ground truth):
/** 
 * Required for creation from map storage 
 */
public ApiaristTracker(String s){
  super(s);
}
Program: 63673
Project: 63673
Buggy source:
@Override public IApiaristTracker getBreedingTracker(World world,GameProfile player){
  String filename="String_Node_Str" + (player == null ? "String_Node_Str" : player.getId());
  ApiaristTracker tracker=(ApiaristTracker)world.loadItemData(ApiaristTracker.class,filename);
  if (tracker == null) {
    tracker=new ApiaristTracker(filename,player,world);
    world.setItemData(filename,tracker);
  }
  return tracker;
}

Fixed version (ground truth):
@Override public IApiaristTracker getBreedingTracker(World world,GameProfile player){
  String filename="String_Node_Str" + (player == null ? "String_Node_Str" : player.getId());
  ApiaristTracker tracker=(ApiaristTracker)world.loadItemData(ApiaristTracker.class,filename);
  if (tracker == null) {
    tracker=new ApiaristTracker(filename);
    world.setItemData(filename,tracker);
  }
  tracker.setUsername(player);
  tracker.setWorld(world);
  return tracker;
}
Program: 63674
Project: 63674
Buggy source:
public ArboristTracker(String s,GameProfile player,World world){
  super(s,player,world);
}

Fixed version (ground truth):
/** 
 * Required for creation from map storage 
 */
public ArboristTracker(String s){
  super(s);
}
Program: 63675
Project: 63675
Buggy source:
@Override public IArboristTracker getBreedingTracker(World world,GameProfile player){
  String filename="String_Node_Str" + (player == null ? "String_Node_Str" : player.getId());
  ArboristTracker tracker=(ArboristTracker)world.loadItemData(ArboristTracker.class,filename);
  if (tracker == null) {
    tracker=new ArboristTracker(filename,player,world);
    world.setItemData(filename,tracker);
  }
  return tracker;
}

Fixed version (ground truth):
@Override public IArboristTracker getBreedingTracker(World world,GameProfile player){
  String filename="String_Node_Str" + (player == null ? "String_Node_Str" : player.getId());
  ArboristTracker tracker=(ArboristTracker)world.loadItemData(ArboristTracker.class,filename);
  if (tracker == null) {
    tracker=new ArboristTracker(filename);
    world.setItemData(filename,tracker);
  }
  tracker.setUsername(player);
  tracker.setWorld(world);
  return tracker;
}
Program: 63676
Project: 63676
Buggy source:
@Override public void researchMutation(IMutation mutation){
  String mutationString=getMutationString(mutation);
  if (!researchedMutations.contains(mutationString)) {
    researchedMutations.add(mutationString);
    markDirty();
    registerMutation(mutation);
  }
}

Fixed version (ground truth):
@Override public void researchMutation(IMutation mutation){
  String mutationString=getMutationString(mutation);
  if (!researchedMutations.contains(mutationString)) {
    researchedMutations.add(mutationString);
    markDirty();
    registerMutation(mutation);
    syncToPlayer(emptyStringCollection,emptyStringCollection,Collections.singleton(mutationString));
  }
}
Program: 63677
Project: 63677
Buggy source:
protected BreedingTracker(String s,@Nullable GameProfile username,@Nullable World world){
  super(s);
  this.username=username;
  this.world=world;
}

Fixed version (ground truth):
protected BreedingTracker(String s){
  super(s);
}
Program: 63678
Project: 63678
Buggy source:
@Override public void synchToPlayer(EntityPlayer player){
  if (player instanceof EntityPlayerMP && !(player instanceof FakePlayer)) {
    IBreedingTracker breedingTracker=getBreedingTracker(player);
    String modeName=breedingTracker.getModeName();
    setModeName(modeName);
    NBTTagCompound nbttagcompound=new NBTTagCompound();
    encodeToNBT(nbttagcompound);
    Proxies.net.sendToPlayer(new PacketGenomeTrackerUpdate(nbttagcompound),player);
  }
}

Fixed version (ground truth):
@Override public void synchToPlayer(EntityPlayer player){
  if (player instanceof EntityPlayerMP && !(player instanceof FakePlayer)) {
    IBreedingTracker breedingTracker=getBreedingTracker(player);
    String modeName=breedingTracker.getModeName();
    setModeName(modeName);
    NBTTagCompound nbttagcompound=new NBTTagCompound();
    encodeToNBT(nbttagcompound);
    PacketGenomeTrackerSync packet=new PacketGenomeTrackerSync(nbttagcompound);
    Proxies.net.sendToPlayer(packet,player);
  }
}
Program: 63679
Project: 63679
Buggy source:
@Override public void registerSpecies(IAlleleSpecies species){
  if (!discoveredSpecies.contains(species.getUID())) {
    discoveredSpecies.add(species.getUID());
    ISpeciesRoot speciesRoot=AlleleManager.alleleRegistry.getSpeciesRoot(speciesRootUID());
    ForestryEvent event=new ForestryEvent.SpeciesDiscovered(speciesRoot,username,species,this);
    MinecraftForge.EVENT_BUS.post(event);
    syncToPlayer();
  }
}

Fixed version (ground truth):
@Override public void registerSpecies(IAlleleSpecies species){
  if (!discoveredSpecies.contains(species.getUID())) {
    discoveredSpecies.add(species.getUID());
    ISpeciesRoot speciesRoot=AlleleManager.alleleRegistry.getSpeciesRoot(speciesRootUID());
    ForestryEvent event=new ForestryEvent.SpeciesDiscovered(speciesRoot,username,species,this);
    MinecraftForge.EVENT_BUS.post(event);
    syncToPlayer(Collections.singleton(species.getUID()),emptyStringCollection,emptyStringCollection);
  }
}
Program: 63680
Project: 63680
Buggy source:
private void syncToPlayer(){
  if (world != null && username != null) {
    EntityPlayer player=world.getPlayerEntityByName(username.getName());
    synchToPlayer(player);
  }
}

Fixed version (ground truth):
private void syncToPlayer(Collection<String> discoveredSpecies,Collection<String> discoveredMutations,Collection<String> researchedMutations){
  if (world != null && username != null) {
    EntityPlayer player=world.getPlayerEntityByName(username.getName());
    if (player instanceof EntityPlayerMP && !(player instanceof FakePlayer)) {
      IBreedingTracker breedingTracker=getBreedingTracker(player);
      String modeName=breedingTracker.getModeName();
      setModeName(modeName);
      NBTTagCompound nbtTagCompound=new NBTTagCompound();
      writeToNBT(nbtTagCompound,discoveredSpecies,discoveredMutations,researchedMutations);
      PacketGenomeTrackerSync packet=new PacketGenomeTrackerSync(nbtTagCompound);
      Proxies.net.sendToPlayer(packet,player);
    }
  }
}
Program: 63681
Project: 63681
Buggy source:
private static void readValuesFromNBT(NBTTagCompound nbttagcompound,Collection<String> values,String countKey,String key){
  values.clear();
  if (nbttagcompound.hasKey(countKey)) {
    final int count=nbttagcompound.getInteger(countKey);
    for (int i=0; i < count; i++) {
      String value=nbttagcompound.getString(key + i);
      if (value != null && value.length() > 0) {
        values.add(value);
      }
    }
  }
}

Fixed version (ground truth):
private static void readValuesFromNBT(NBTTagCompound nbttagcompound,Set<String> values,String countKey,String key){
  if (nbttagcompound.hasKey(countKey)) {
    final int count=nbttagcompound.getInteger(countKey);
    for (int i=0; i < count; i++) {
      String value=nbttagcompound.getString(key + i);
      if (value != null && value.length() > 0) {
        values.add(value);
      }
    }
  }
}
Program: 63682
Project: 63682
Buggy source:
@Override public void writeToNBT(NBTTagCompound nbttagcompound){
  if (modeName != null && !modeName.isEmpty()) {
    nbttagcompound.setString(MODE_NAME_KEY,modeName);
  }
  nbttagcompound.setString(TYPE_KEY,speciesRootUID());
  writeValuesToNBT(nbttagcompound,discoveredSpecies,SPECIES_COUNT_KEY,SPECIES_KEY);
  writeValuesToNBT(nbttagcompound,discoveredMutations,MUTATIONS_COUNT_KEY,MUTATIONS_KEY);
  writeValuesToNBT(nbttagcompound,researchedMutations,RESEARCHED_COUNT_KEY,RESEARCHED_KEY);
}

Fixed version (ground truth):
private void writeToNBT(NBTTagCompound nbtTagCompound,Collection<String> discoveredSpecies,Collection<String> discoveredMutations,Collection<String> researchedMutations){
  if (modeName != null && !modeName.isEmpty()) {
    nbtTagCompound.setString(MODE_NAME_KEY,modeName);
  }
  nbtTagCompound.setString(TYPE_KEY,speciesRootUID());
  writeValuesToNBT(nbtTagCompound,discoveredSpecies,SPECIES_COUNT_KEY,SPECIES_KEY);
  writeValuesToNBT(nbtTagCompound,discoveredMutations,MUTATIONS_COUNT_KEY,MUTATIONS_KEY);
  writeValuesToNBT(nbtTagCompound,researchedMutations,RESEARCHED_COUNT_KEY,RESEARCHED_KEY);
}
Program: 63683
Project: 63683
Buggy source:
@Override public void registerMutation(IMutation mutation){
  String mutationString=getMutationString(mutation);
  if (!discoveredMutations.contains(mutationString)) {
    discoveredMutations.add(mutationString);
    markDirty();
    ISpeciesRoot speciesRoot=AlleleManager.alleleRegistry.getSpeciesRoot(speciesRootUID());
    ForestryEvent event=new ForestryEvent.MutationDiscovered(speciesRoot,username,mutation,this);
    MinecraftForge.EVENT_BUS.post(event);
    syncToPlayer();
  }
}

Fixed version (ground truth):
@Override public void registerMutation(IMutation mutation){
  String mutationString=getMutationString(mutation);
  if (!discoveredMutations.contains(mutationString)) {
    discoveredMutations.add(mutationString);
    markDirty();
    ISpeciesRoot speciesRoot=AlleleManager.alleleRegistry.getSpeciesRoot(speciesRootUID());
    ForestryEvent event=new ForestryEvent.MutationDiscovered(speciesRoot,username,mutation,this);
    MinecraftForge.EVENT_BUS.post(event);
    syncToPlayer(emptyStringCollection,Collections.singleton(mutationString),emptyStringCollection);
  }
}
Program: 63684
Project: 63684
Buggy source:
private void drawProbabilityArrow(float chance,int x,int y){
  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);
}

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);
GL11.glColor4f(1.0f,1.0f,1.0f,1.0f);
}
}
Program: 63685
Project: 63685
Buggy source:
protected void drawMutationInfo(IMutation combination,IAllele species,int x){
  ItemStack partnerBee=iconStacks.get(combination.getPartner(species).getUID());
  widgetManager.add(new ItemStackWidget(widgetManager,x,textLayout.getLineY(),partnerBee));
  drawProbabilityArrow(combination.getBaseChance(),guiLeft + x + 18,guiTop + textLayout.getLineY() + 4);
  IAllele result=combination.getTemplate()[EnumBeeChromosome.SPECIES.ordinal()];
  ItemStack resultBee=iconStacks.get(result.getUID());
  widgetManager.add(new ItemStackWidget(widgetManager,x + 33,textLayout.getLineY(),resultBee));
}

Fixed version (ground truth):
protected void drawMutationInfo(IMutation combination,IAllele species,int x){
  ItemStack partnerBee=iconStacks.get(combination.getPartner(species).getUID());
  widgetManager.add(new ItemStackWidget(widgetManager,x,textLayout.getLineY(),partnerBee));
  drawProbabilityArrow(combination,guiLeft + x + 18,guiTop + textLayout.getLineY() + 4);
  IAllele result=combination.getTemplate()[EnumBeeChromosome.SPECIES.ordinal()];
  ItemStack resultBee=iconStacks.get(result.getUID());
  widgetManager.add(new ItemStackWidget(widgetManager,x + 33,textLayout.getLineY(),resultBee));
}
Program: 63686
Project: 63686
Buggy source:
protected void drawAnalyticsPageMutations(IIndividual individual){
  textLayout.startPage(COLUMN_0,COLUMN_1,COLUMN_2);
  textLayout.drawLine(StringUtil.localize("String_Node_Str") + "String_Node_Str",COLUMN_0);
  textLayout.newLine();
  RenderHelper.enableGUIStandardItemLighting();
  HashMap<IMutation,IAllele> combinations=new HashMap<>();
  for (  IMutation mutation : speciesRoot.getCombinations(individual.getGenome().getPrimary())) {
    combinations.put(mutation,individual.getGenome().getPrimary());
  }
  for (  IMutation mutation : speciesRoot.getCombinations(individual.getGenome().getSecondary())) {
    combinations.put(mutation,individual.getGenome().getSecondary());
  }
  int columnWidth=50;
  int x=0;
  for (  Map.Entry<IMutation,IAllele> mutation : combinations.entrySet()) {
    if (breedingTracker.isDiscovered(mutation.getKey())) {
      drawMutationInfo(mutation.getKey(),mutation.getValue(),COLUMN_0 + x);
    }
 else {
      if (mutation.getKey().isSecret()) {
        continue;
      }
      drawUnknownMutation(mutation.getKey(),COLUMN_0 + x);
    }
    x+=columnWidth;
    if (x >= columnWidth * 4) {
      x=0;
      textLayout.newLine();
    }
  }
  textLayout.endPage();
}

Fixed version (ground truth):
protected void drawAnalyticsPageMutations(IIndividual individual){
  textLayout.startPage(COLUMN_0,COLUMN_1,COLUMN_2);
  textLayout.drawLine(StringUtil.localize("String_Node_Str") + "String_Node_Str",COLUMN_0);
  textLayout.newLine();
  RenderHelper.enableGUIStandardItemLighting();
  HashMap<IMutation,IAllele> combinations=new HashMap<>();
  for (  IMutation mutation : speciesRoot.getCombinations(individual.getGenome().getPrimary())) {
    combinations.put(mutation,individual.getGenome().getPrimary());
  }
  for (  IMutation mutation : speciesRoot.getCombinations(individual.getGenome().getSecondary())) {
    combinations.put(mutation,individual.getGenome().getSecondary());
  }
  int columnWidth=50;
  int x=0;
  for (  Map.Entry<IMutation,IAllele> mutation : combinations.entrySet()) {
    if (breedingTracker.isDiscovered(mutation.getKey())) {
      drawMutationInfo(mutation.getKey(),mutation.getValue(),COLUMN_0 + x);
    }
 else {
      if (mutation.getKey().isSecret()) {
        continue;
      }
      drawUnknownMutation(mutation.getKey(),COLUMN_0 + x);
    }
    x+=columnWidth;
    if (x >= columnWidth * 4) {
      x=0;
      textLayout.newLine(16);
    }
  }
  textLayout.endPage();
}
Program: 63687
Project: 63687
Buggy source:
private void drawUnknownMutation(IMutation combination,int x){
  drawQuestionMark(guiLeft + x,guiTop + textLayout.getLineY());
  drawProbabilityArrow(combination.getBaseChance(),guiLeft + x + 18,guiTop + textLayout.getLineY() + 4);
  drawQuestionMark(guiLeft + x + 32,guiTop + textLayout.getLineY());
}

Fixed version (ground truth):
private void drawUnknownMutation(IMutation combination,int x){
  drawQuestionMark(guiLeft + x,guiTop + textLayout.getLineY());
  drawProbabilityArrow(combination,guiLeft + x + 18,guiTop + textLayout.getLineY() + 4);
  drawQuestionMark(guiLeft + x + 32,guiTop + textLayout.getLineY());
}
Program: 63688
Project: 63688
Buggy source:
protected void drawAnalyticsOverview(){
  textLayout.startPage();
  textLayout.newLine();
  String title=StringUtil.localize(guiName).toUpperCase();
  textLayout.drawCenteredLine(title,8,208,fontColor.get("String_Node_Str"));
  textLayout.newLine();
  fontRendererObj.drawSplitString(StringUtil.localize(guiName + "String_Node_Str"),guiLeft + COLUMN_0 + 4,guiTop + 42,200,fontColor.get("String_Node_Str"));
  textLayout.newLine();
  textLayout.newLine();
  textLayout.newLine();
  textLayout.drawLine(StringUtil.localize("String_Node_Str") + "String_Node_Str",COLUMN_0 + 4);
  textLayout.newLine();
  textLayout.drawLine("String_Node_Str" + StringUtil.localize("String_Node_Str"),COLUMN_0 + 4);
  textLayout.newLine();
  textLayout.drawLine("String_Node_Str" + StringUtil.localize("String_Node_Str"),COLUMN_0 + 4);
  textLayout.newLine();
  textLayout.drawLine("String_Node_Str" + StringUtil.localize("String_Node_Str"),COLUMN_0 + 4);
  textLayout.newLine();
  textLayout.drawLine("String_Node_Str" + StringUtil.localize("String_Node_Str"),COLUMN_0 + 4);
  textLayout.newLine();
  String mode=breedingTracker.getModeName();
  if (mode != null && !mode.isEmpty()) {
    String rules=StringUtil.localize(guiName + "String_Node_Str") + "String_Node_Str" + WordUtils.capitalize(mode);
    textLayout.drawCenteredLine(rules,8,208,fontColor.get(guiName + "String_Node_Str"));
  }
  textLayout.endPage();
}

Fixed version (ground truth):
protected void drawAnalyticsOverview(){
  textLayout.startPage();
  textLayout.newLine();
  String title=StringUtil.localize(guiName).toUpperCase();
  textLayout.drawCenteredLine(title,8,208,fontColor.get("String_Node_Str"));
  textLayout.newLine();
  fontRendererObj.drawSplitString(StringUtil.localize(guiName + "String_Node_Str"),guiLeft + COLUMN_0 + 4,guiTop + 42,200,fontColor.get("String_Node_Str"));
  textLayout.newLine();
  textLayout.newLine();
  textLayout.newLine();
  textLayout.drawLine(StringUtil.localize("String_Node_Str") + "String_Node_Str",COLUMN_0 + 4);
  textLayout.newLine();
  textLayout.drawLine("String_Node_Str" + StringUtil.localize("String_Node_Str"),COLUMN_0 + 4);
  textLayout.newLine();
  textLayout.drawLine("String_Node_Str" + StringUtil.localize("String_Node_Str"),COLUMN_0 + 4);
  textLayout.newLine();
  textLayout.drawLine("String_Node_Str" + StringUtil.localize("String_Node_Str"),COLUMN_0 + 4);
  textLayout.newLine();
  textLayout.drawLine("String_Node_Str" + StringUtil.localize("String_Node_Str"),COLUMN_0 + 4);
  textLayout.endPage();
}
Program: 63689
Project: 63689
Buggy source:
@Override public void registerPackets(){
  registerClientPacket(new PacketErrorUpdate());
  registerClientPacket(new PacketErrorUpdateEntity());
  registerClientPacket(new PacketGuiUpdate());
  registerClientPacket(new PacketGuiUpdateEntity());
  registerClientPacket(new PacketGuiLayoutSelect());
  registerClientPacket(new PacketGuiEnergy());
  registerClientPacket(new PacketSocketUpdate());
  registerClientPacket(new PacketAccessUpdate());
  registerClientPacket(new PacketAccessUpdateEntity());
  registerClientPacket(new PacketTileStream());
  registerClientPacket(new PacketItemStackDisplay());
  registerClientPacket(new PacketFXSignal());
  registerClientPacket(new PacketTankLevelUpdate());
  registerClientPacket(new PacketGenomeTrackerUpdate());
  registerServerPacket(new PacketGuiSelectRequest());
  registerServerPacket(new PacketPipetteClick());
  registerServerPacket(new PacketAccessSwitch());
  registerServerPacket(new PacketAccessSwitchEntity());
  registerServerPacket(new PacketChipsetClick());
  registerServerPacket(new PacketSolderingIronClick());
}

Fixed version (ground truth):
@Override public void registerPackets(){
  registerClientPacket(new PacketErrorUpdate());
  registerClientPacket(new PacketErrorUpdateEntity());
  registerClientPacket(new PacketGuiUpdate());
  registerClientPacket(new PacketGuiUpdateEntity());
  registerClientPacket(new PacketGuiLayoutSelect());
  registerClientPacket(new PacketGuiEnergy());
  registerClientPacket(new PacketSocketUpdate());
  registerClientPacket(new PacketAccessUpdate());
  registerClientPacket(new PacketAccessUpdateEntity());
  registerClientPacket(new PacketTileStream());
  registerClientPacket(new PacketItemStackDisplay());
  registerClientPacket(new PacketFXSignal());
  registerClientPacket(new PacketTankLevelUpdate());
  registerClientPacket(new PacketGenomeTrackerSync());
  registerServerPacket(new PacketGuiSelectRequest());
  registerServerPacket(new PacketPipetteClick());
  registerServerPacket(new PacketAccessSwitch());
  registerServerPacket(new PacketAccessSwitchEntity());
  registerServerPacket(new PacketChipsetClick());
  registerServerPacket(new PacketSolderingIronClick());
}
Program: 63690
Project: 63690
Buggy source:
@Override public ILepidopteristTracker getBreedingTracker(World world,GameProfile player){
  String filename="String_Node_Str" + (player == null ? "String_Node_Str" : player.getId());
  LepidopteristTracker tracker=(LepidopteristTracker)world.loadItemData(LepidopteristTracker.class,filename);
  if (tracker == null) {
    tracker=new LepidopteristTracker(filename,player,world);
    world.setItemData(filename,tracker);
  }
  return tracker;
}

Fixed version (ground truth):
@Override public ILepidopteristTracker getBreedingTracker(World world,GameProfile player){
  String filename="String_Node_Str" + (player == null ? "String_Node_Str" : player.getId());
  LepidopteristTracker tracker=(LepidopteristTracker)world.loadItemData(LepidopteristTracker.class,filename);
  if (tracker == null) {
    tracker=new LepidopteristTracker(filename);
    world.setItemData(filename,tracker);
  }
  tracker.setUsername(player);
  tracker.setWorld(world);
  return tracker;
}
Program: 63691
Project: 63691
Buggy source:
public LepidopteristTracker(String s,GameProfile player,World world){
  super(s,player,world);
}

Fixed version (ground truth):
/** 
 * Required for creation from map storage 
 */
public LepidopteristTracker(String s){
  super(s);
}
Program: 63692
Project: 63692
Buggy source:
private static void parsePlantableFlowers(Property property,String flowerType){
  for (  String string : property.getStringList()) {
    StackUtils.Stack plantableFlower=StackUtils.parseStackString(string,OreDictionary.WILDCARD_VALUE);
    if (plantableFlower == null) {
      continue;
    }
    Block plantableFlowerBlock=plantableFlower.getBlock();
    int meta=plantableFlower.getMeta();
    if (plantableFlowerBlock != null) {
      FlowerManager.flowerRegistry.registerPlantableFlower(plantableFlowerBlock,meta,1.0,flowerType);
    }
 else {
      Proxies.log.warning("String_Node_Str" + plantableFlower + "String_Node_Str"+ property.getName()+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private static void parsePlantableFlowers(Property property,String flowerType){
  for (  String string : property.getStringList()) {
    StackUtils.Stack plantableFlower=StackUtils.parseStackString(string,OreDictionary.WILDCARD_VALUE);
    if (plantableFlower == null) {
      continue;
    }
    Block plantableFlowerBlock=plantableFlower.getBlock();
    int meta=plantableFlower.getMeta();
    if (plantableFlowerBlock != null) {
      FlowerManager.flowerRegistry.registerPlantableFlower(plantableFlowerBlock,meta,1.0,flowerType);
    }
 else {
      Proxies.log.warning("String_Node_Str" + string + "String_Node_Str"+ property.getName()+ "String_Node_Str");
    }
  }
}
Program: 63693
Project: 63693
Buggy source:
public static boolean tryAddStack(IInventory inventory,ItemStack stack,int startSlot,int slots,boolean all,boolean doAdd){
  int added=addStack(inventory,stack,startSlot,slots,doAdd);
  if (all) {
    return added == stack.stackSize;
  }
 else {
    return added > 0;
  }
}

Fixed version (ground truth):
public static boolean tryAddStack(IInventory inventory,ItemStack stack,int startSlot,int slots,boolean all,boolean doAdd){
  int added=addStack(inventory,stack,startSlot,slots,false);
  boolean success=all ? (added == stack.stackSize) : (added > 0);
  if (success && doAdd) {
    addStack(inventory,stack,startSlot,slots,true);
  }
  return success;
}
Program: 63694
Project: 63694
Buggy source:
private boolean hasFlowers(){
  if (queen == null) {
    return true;
  }
  if (hasFlowersCooldown <= 0) {
    hasFlowersCached=queen.hasFlower(housing);
    hasFlowersCooldown=PluginApiculture.ticksPerBeeWorkCycle / ticksPerCheckCanWork;
    if (!hasFlowersCached) {
      hasFlowersCooldown/=2;
    }
  }
 else {
    hasFlowersCooldown--;
  }
  if (housingSupportsMultipleErrorStates) {
    housing.setErrorCondition(!hasFlowersCached,EnumErrorCode.NOFLOWER);
  }
 else {
    if (hasFlowersCached) {
      housing.setErrorState(EnumErrorCode.OK);
    }
 else {
      housing.setErrorState(EnumErrorCode.NOFLOWER);
    }
  }
  return hasFlowersCached;
}

Fixed version (ground truth):
private boolean hasFlowers(){
  if (queen == null) {
    return true;
  }
  if (hasFlowersCooldown <= 0) {
    hasFlowersCached=queen.hasFlower(housing);
    hasFlowersCooldown=PluginApiculture.ticksPerBeeWorkCycle;
    if (!hasFlowersCached) {
      hasFlowersCooldown/=2;
    }
  }
 else {
    hasFlowersCooldown--;
  }
  if (housingSupportsMultipleErrorStates) {
    housing.setErrorCondition(!hasFlowersCached,EnumErrorCode.NOFLOWER);
  }
 else {
    if (hasFlowersCached) {
      housing.setErrorState(EnumErrorCode.OK);
    }
 else {
      housing.setErrorState(EnumErrorCode.NOFLOWER);
    }
  }
  return hasFlowersCached;
}