nus-yam/ex-repair huggingface dataset:
Program: 109772
Project: 109772
Buggy source:
@SubscribeEvent public void handlePineappleBreakEvent(HarvestDropsEvent event){
  EntityPlayer player=event.getHarvester();
  if (player == null) {
    return;
  }
  ItemStack held=player.getHeldItemMainhand();
  IBlockState state=event.getState();
  if (state.getBlock() != BlockRegistry.pineapple) {
    return;
  }
  boolean isTop=state.getValue(BlockPineapple.HALF) == PlantHalf.UPPER;
  boolean isGrown=isTop || state.getValue(BlockPineapple.STAGE) == BlockPineapple.TOTAL_GROW_TICKS;
  if (isGrown) {
    if (held != null && held.getItem() instanceof ItemSword) {
      event.getDrops().add(new ItemStack(ItemRegistry.pineappleCubes,event.getWorld().rand.nextInt(3) + 2));
    }
 else {
      event.getDrops().add(new ItemStack(BlockRegistry.pineapple));
    }
  }
  if (!isTop) {
    event.getWorld().setBlockToAir(event.getPos().up());
  }
}

Fixed version (ground truth):
@SubscribeEvent public void handlePineappleBreakEvent(HarvestDropsEvent event){
  EntityPlayer player=event.getHarvester();
  if (player == null) {
    return;
  }
  ItemStack held=player.getHeldItemMainhand();
  IBlockState state=event.getState();
  if (state.getBlock() != BlockRegistry.pineapple) {
    return;
  }
  IBlockState stateUp=event.getWorld().getBlockState(event.getPos().up());
  boolean isTop=state.getValue(BlockPineapple.HALF) == PlantHalf.UPPER;
  boolean isGrown=isTop || (state.getValue(BlockPineapple.STAGE) == BlockPineapple.TOTAL_GROW_TICKS && stateUp.getBlock() instanceof BlockPineapple && stateUp.getValue(BlockPineapple.HALF) == PlantHalf.UPPER);
  if (isGrown) {
    if (held != null && held.getItem() instanceof ItemSword) {
      event.getDrops().add(new ItemStack(ItemRegistry.pineappleCubes,event.getWorld().rand.nextInt(3) + 2));
    }
 else {
      event.getDrops().add(new ItemStack(BlockRegistry.pineapple));
    }
  }
  if (!isTop) {
    event.getWorld().setBlockToAir(event.getPos().up());
  }
}
Program: 109773
Project: 109773
Buggy source:
public ItemStack getTankStack(){
  return stack;
}

Fixed version (ground truth):
@Nonnull public ItemStack getTankStack(){
  return stack;
}
Program: 109774
Project: 109774
Buggy source:
@Override public boolean isActive(){
  return getTankStack() != null;
}

Fixed version (ground truth):
@Override public boolean isActive(){
  return !getTankStack().isEmpty();
}
Program: 109775
Project: 109775
Buggy source:
@Override public IMessage onMessage(MessageAirCompressorInventory message,MessageContext ctx){
  TileEntityAirCompressor compressor=message.getClientTileEntity();
  if (compressor != null) {
    if (message.tank != null) {
      compressor.addTank(message.tank);
    }
 else {
      compressor.ejectTank();
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IMessage onMessage(MessageAirCompressorInventory message,MessageContext ctx){
  TileEntityAirCompressor compressor=message.getClientTileEntity();
  if (compressor != null) {
    if (!message.tank.isEmpty()) {
      compressor.addTank(message.tank);
    }
 else {
      compressor.ejectTank();
    }
  }
  return null;
}
Program: 109778
Project: 109778
Buggy source:
@SubscribeEvent public void onCrafting(ItemCraftedEvent event){
  if (event.player == null)   return;
  if (event.crafting.getItem() == ItemRegistry.cocktail) {
    ItemStack pinaColada=MixerRecipes.getItemStack(Drink.pinaColada);
    if (pinaColada.isItemEqual(event.crafting)) {
      event.player.addStat(AchievementRegistry.craftPinaColada);
    }
  }
}

Fixed version (ground truth):
@SubscribeEvent public void onCrafting(ItemCraftedEvent event){
  if (event.player == null)   return;
  if (event.crafting.getItem() == ItemRegistry.cocktail) {
    ItemStack pinaColada=MixerRecipes.getItemStack(Drink.pinaColada);
    if (pinaColada.isItemEqual(event.crafting)) {
    }
  }
}
Program: 109779
Project: 109779
Buggy source:
/** 
 * Called when the player finishes using this Item (E.g. finishes eating.). Not called when the player stops using the Item before the action is complete.
 */
@Nullable public ItemStack onItemUseFinish(ItemStack stack,World worldIn,EntityLivingBase entityLiving){
  if (entityLiving instanceof EntityPlayer) {
    EntityPlayer player=(EntityPlayer)entityLiving;
    this.onFoodEaten(stack,worldIn,player);
    Drink drink=getDrink(stack);
    if (worldIn.isRainingAt(player.getPosition()) && drink == Drink.pinaColada) {
      player.addStat(AchievementRegistry.drinkPinaColada);
    }
  }
  return stack;
}

Fixed version (ground truth):
/** 
 * Called when the player finishes using this Item (E.g. finishes eating.). Not called when the player stops using the Item before the action is complete.
 */
@Nullable public ItemStack onItemUseFinish(ItemStack stack,World worldIn,EntityLivingBase entityLiving){
  if (entityLiving instanceof EntityPlayer) {
    EntityPlayer player=(EntityPlayer)entityLiving;
    this.onFoodEaten(stack,worldIn,player);
    Drink drink=getDrink(stack);
    if (worldIn.isRainingAt(player.getPosition()) && drink == Drink.pinaColada) {
    }
  }
  return stack;
}
Program: 109780
Project: 109780
Buggy source:
public RecipeEntry getFormattedRecipe(ShapedRecipes recipe){
  try {
    int width=recipe.recipeWidth;
    int height=recipe.recipeHeight;
    ItemStack[] items=recipe.recipeItems;
    ItemStack output=recipe.getRecipeOutput();
    return new RecipeEntry(width,height,items,output);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
public RecipeEntry getFormattedRecipe(ShapedRecipes recipe){
  try {
    int width=recipe.recipeWidth;
    int height=recipe.recipeHeight;
    NonNullList<Ingredient> items=recipe.recipeItems;
    ItemStack output=recipe.getRecipeOutput();
    return new RecipeEntry(width,height,items,output);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
  return null;
}
Program: 109781
Project: 109781
Buggy source:
public RecipeEntry(int width,int height,ItemStack[] ingredients,ItemStack output){
  this.width=width;
  this.height=height;
  this.ingredients=ingredients;
  this.output=output;
}

Fixed version (ground truth):
public RecipeEntry(int width,int height,NonNullList<Ingredient> items,ItemStack output){
  this.width=width;
  this.height=height;
  this.ingredients=items;
  this.output=output;
}
Program: 109783
Project: 109783
Buggy source:
@SubscribeEvent public void handlePineappleBreakEvent(HarvestDropsEvent event){
  EntityPlayer player=event.getHarvester();
  if (player == null) {
    return;
  }
  ItemStack held=player.getHeldItemMainhand();
  IBlockState state=event.getState();
  boolean isTop=state.getValue(BlockPineapple.HALF) == PlantHalf.UPPER;
  boolean isGrown=isTop || state.getValue(BlockPineapple.STAGE) == BlockPineapple.TOTAL_GROW_TICKS;
  if (isGrown) {
    if (held != null && held.getItem() instanceof ItemSword) {
      event.getDrops().add(new ItemStack(ItemRegistry.pineappleCubes,event.getWorld().rand.nextInt(4)));
    }
 else {
      event.getDrops().add(new ItemStack(BlockRegistry.pineapple));
    }
  }
  if (!isTop) {
    event.getWorld().setBlockToAir(event.getPos().up());
  }
}

Fixed version (ground truth):
@SubscribeEvent public void handlePineappleBreakEvent(HarvestDropsEvent event){
  EntityPlayer player=event.getHarvester();
  if (player == null) {
    return;
  }
  ItemStack held=player.getHeldItemMainhand();
  IBlockState state=event.getState();
  if (state.getBlock() != BlockRegistry.pineapple) {
    return;
  }
  boolean isTop=state.getValue(BlockPineapple.HALF) == PlantHalf.UPPER;
  boolean isGrown=isTop || state.getValue(BlockPineapple.STAGE) == BlockPineapple.TOTAL_GROW_TICKS;
  if (isGrown) {
    if (held != null && held.getItem() instanceof ItemSword) {
      event.getDrops().add(new ItemStack(ItemRegistry.pineappleCubes,event.getWorld().rand.nextInt(4)));
    }
 else {
      event.getDrops().add(new ItemStack(BlockRegistry.pineapple));
    }
  }
  if (!isTop) {
    event.getWorld().setBlockToAir(event.getPos().up());
  }
}
Program: 109784
Project: 109784
Buggy source:
public AIAshenShootDart(EntityAshen entity){
  this.entity=entity;
  this.attackCooldown=60;
  this.maxAttackDistance=15 * 15;
  this.moveSpeedAmplifier=2.0F;
}

Fixed version (ground truth):
public AIAshenShootDart(EntityAshen entity){
  this.entity=entity;
  this.attackCooldown=60;
  this.maxAttackDistance=15 * 15;
  this.moveSpeedAmplifier=1.0F;
}
Program: 109785
Project: 109785
Buggy source:
@Override protected void applyEntityAttributes(){
  super.applyEntityAttributes();
  this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20.0D);
  this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.24D);
  this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(getAttackStrength());
}

Fixed version (ground truth):
@Override protected void applyEntityAttributes(){
  super.applyEntityAttributes();
  this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20.0D);
  this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.35D);
  this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(getAttackStrength());
}
Program: 109786
Project: 109786
Buggy source:
@Override public void onUpdate(){
  if (!world.isRemote) {
    if (this.ticksExisted == 1 && type >= 0) {
      this.setType(type);
    }
  }
  if (onGround) {
    this.motionX*=.5F;
    this.motionZ*=.5F;
    this.motionY=0;
  }
  if (this.checkForWater(0)) {
    this.motionY=.02F;
    this.motionX*=.95F;
    this.motionZ*=.95F;
  }
 else {
    int xMod=world.rand.nextInt(10);
    int yMod=world.rand.nextInt(30);
    int zMod=world.rand.nextInt(10);
    int[] a=this.getRotator();
    a[0]+=xMod;
    a[1]+=yMod;
    a[2]+=zMod;
    this.setRotator(a);
    motionY-=.05f;
  }
  this.move(motionX,motionY,motionZ);
}

Fixed version (ground truth):
@Override public void onUpdate(){
  if (!world.isRemote) {
    if (this.ticksExisted == 1 && type >= 0) {
      this.setType(type);
    }
    if (this.ticksExisted >= 24000) {
      this.setDead();
    }
  }
  if (onGround) {
    this.motionX*=.5F;
    this.motionZ*=.5F;
    this.motionY=0;
  }
  if (this.checkForWater(0)) {
    this.motionY=.02F;
    this.motionX*=.95F;
    this.motionZ*=.95F;
  }
 else {
    int xMod=world.rand.nextInt(10);
    int yMod=world.rand.nextInt(30);
    int zMod=world.rand.nextInt(10);
    int[] a=this.getRotator();
    a[0]+=xMod;
    a[1]+=yMod;
    a[2]+=zMod;
    this.setRotator(a);
    motionY-=.05f;
  }
  this.move(motionX,motionY,motionZ);
}
Program: 109787
Project: 109787
Buggy source:
@Override public ModelBiped getArmorModel(EntityLivingBase entityLiving,ItemStack itemStack,EntityEquipmentSlot armorSlot,ModelBiped _default){
  if (armorSlot == EntityEquipmentSlot.HEAD)   return new RenderArmorMask(maskType.getMeta());
 else   return null;
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving,ItemStack itemStack,EntityEquipmentSlot armorSlot,ModelBiped _default){
  if (armorSlot == EntityEquipmentSlot.HEAD)   return new RenderArmorMask(maskType.getMeta());
 else   return null;
}
Program: 109788
Project: 109788
Buggy source:
public RenderAshen(ModelBase modelbase,float f){
  super(Minecraft.getMinecraft().getRenderManager(),modelbase,f);
  modelAshen=(ModelAshen)modelbase;
  this.addLayer(new LayerMaskAshen(modelAshen));
  this.addLayer(new LayerHeldItemAshen(this,modelAshen));
}

Fixed version (ground truth):
public RenderAshen(ModelBase modelbase,float f){
  super(Minecraft.getMinecraft().getRenderManager(),modelbase,f);
  modelAshen=(ModelAshen)modelbase;
  this.addLayer(new LayerMaskAshen(modelAshen));
  this.addLayer(new LayerHeldItemAshen(this,modelAshen));
  this.shadowOpaque=0.5f;
  this.shadowSize=0.3f;
}
Program: 109789
Project: 109789
Buggy source:
public void renderLostMask(EntityLostMask entity,double d,double d1,double d2,float f,float f1){
  this.bindEntityTexture(entity);
  GL11.glPushMatrix();
  GL11.glTranslatef((float)d,(float)d1,(float)d2);
  GL11.glRotatef(f,0.0F,1.0F,0.0F);
  if (!entity.onGround && !entity.checkForWater(0) && !entity.checkForWater(-1)) {
    int[] a=entity.getRotator();
    GL11.glRotatef(a[0] + f1,1.0F,0.0F,0.0F);
    GL11.glRotatef(a[1] + f1,0.0F,1.0F,0.0F);
    GL11.glRotatef(a[2] + f1,0.0F,0.0F,1.0F);
  }
 else {
    GL11.glRotatef(270,1,0,0);
    GL11.glRotatef(180,0,0,1);
  }
  mask.renderMask(entity.getColor());
  GL11.glPopMatrix();
}

Fixed version (ground truth):
public void renderLostMask(EntityLostMask entity,double d,double d1,double d2,float f,float f1){
  GlStateManager.pushMatrix();
  this.bindEntityTexture(entity);
  GlStateManager.translate(d,d1,d2);
  GlStateManager.rotate(f,0.0F,1.0F,0.0F);
  if (!entity.onGround && !entity.checkForWater(0) && !entity.checkForWater(-1)) {
    int[] a=entity.getRotator();
    GlStateManager.rotate(a[0] + f1,1.0F,0.0F,0.0F);
    GlStateManager.rotate(a[1] + f1,0.0F,1.0F,0.0F);
    GlStateManager.rotate(a[2] + f1,0.0F,0.0F,1.0F);
  }
 else {
    GlStateManager.rotate(270,1,0,0);
    GlStateManager.rotate(180,0,0,1);
  }
  mask.renderMask(entity.getType());
  GlStateManager.popMatrix();
}
Program: 109790
Project: 109790
Buggy source:
public RenderLostMask(){
  super(Minecraft.getMinecraft().getRenderManager());
  shadowSize=0.5F;
  mask=new TropicraftSpecialRenderHelper();
}

Fixed version (ground truth):
public RenderLostMask(){
  super(Minecraft.getMinecraft().getRenderManager());
  shadowSize=0.5F;
  this.shadowOpaque=0.5f;
  mask=new TropicraftSpecialRenderHelper();
}
Program: 109791
Project: 109791
Buggy source:
@Override public boolean shouldExecute(){
  return !ashen.hasMask();
}

Fixed version (ground truth):
@Override public boolean shouldExecute(){
  return !ashen.hasMask() && ashen.maskToTrack != null;
}
Program: 109792
Project: 109792
Buggy source:
/** 
 * Spawns a LostMask into the world at a given position and angle
 * @param world World object
 * @param color Mask type
 * @param x X position
 * @param y Y position
 * @param z Z position
 * @param angle Use the "attackers" rotationYaw
 */
public EntityLostMask(World world,int type,double x,double y,double z,double angle){
  this(world);
  this.setPosition(x,y,z);
  this.setType(type);
  motionX=Math.cos(Math.toRadians(angle + 90)) * launchedSpeed;
  motionZ=Math.sin(Math.toRadians(angle + 90)) * launchedSpeed;
  double subAngle=MathHelper.wrapDegrees(angle);
  double subAngle2=subAngle + (180 - subAngle) * 2;
  this.rotationYaw=(float)(subAngle2);
}

Fixed version (ground truth):
/** 
 * Spawns a LostMask into the world at a given position and angle
 * @param world World object
 * @param color Mask type
 * @param x X position
 * @param y Y position
 * @param z Z position
 * @param angle Use the "attackers" rotationYaw
 */
public EntityLostMask(World world,int type,double x,double y,double z,double angle){
  this(world);
  this.setPosition(x,y,z);
  motionX=Math.cos(Math.toRadians(angle + 90)) * launchedSpeed;
  motionZ=Math.sin(Math.toRadians(angle + 90)) * launchedSpeed;
  double subAngle=MathHelper.wrapDegrees(angle);
  double subAngle2=subAngle + (180 - subAngle) * 2;
  this.rotationYaw=(float)(subAngle2);
  this.type=type;
}
Program: 109793
Project: 109793
Buggy source:
@Override protected void writeEntityToNBT(NBTTagCompound nbt){
  nbt.setInteger("String_Node_Str",this.getColor());
}

Fixed version (ground truth):
@Override protected void writeEntityToNBT(NBTTagCompound nbt){
  nbt.setInteger("String_Node_Str",this.getType());
}
Program: 109794
Project: 109794
Buggy source:
public int getType(){
  return this.getColor();
}

Fixed version (ground truth):
public int getType(){
  return this.dataManager.get(MASK_TYPE).intValue();
}
Program: 109795
Project: 109795
Buggy source:
@Override public void onUpdate(){
  if (onGround) {
    this.motionX*=.5F;
    this.motionZ*=.5F;
    this.motionY=0;
  }
  if (this.checkForWater(0)) {
    this.motionY=.02F;
    this.motionX*=.95F;
    this.motionZ*=.95F;
  }
 else {
    int xMod=world.rand.nextInt(10);
    int yMod=world.rand.nextInt(30);
    int zMod=world.rand.nextInt(10);
    int[] a=this.getRotator();
    a[0]+=xMod;
    a[1]+=yMod;
    a[2]+=zMod;
    this.setRotator(a);
    motionY-=.05f;
  }
  this.move(motionX,motionY,motionZ);
}

Fixed version (ground truth):
@Override public void onUpdate(){
  if (!world.isRemote) {
    if (this.ticksExisted == 1 && type >= 0) {
      this.setType(type);
    }
  }
  if (onGround) {
    this.motionX*=.5F;
    this.motionZ*=.5F;
    this.motionY=0;
  }
  if (this.checkForWater(0)) {
    this.motionY=.02F;
    this.motionX*=.95F;
    this.motionZ*=.95F;
  }
 else {
    int xMod=world.rand.nextInt(10);
    int yMod=world.rand.nextInt(30);
    int zMod=world.rand.nextInt(10);
    int[] a=this.getRotator();
    a[0]+=xMod;
    a[1]+=yMod;
    a[2]+=zMod;
    this.setRotator(a);
    motionY-=.05f;
  }
  this.move(motionX,motionY,motionZ);
}
Program: 109796
Project: 109796
Buggy source:
public void setPlayerSize(EntityPlayer p,float x,float y,float offset,float height){
  AxisAlignedBB axisalignedbb=p.getEntityBoundingBox();
  p.setEntityBoundingBox(new AxisAlignedBB(axisalignedbb.minX,axisalignedbb.minY,axisalignedbb.minZ,axisalignedbb.minX + (double)x,axisalignedbb.minY + (double)y,axisalignedbb.minZ + (double)x));
  p.posY-=offset;
  p.height=height;
}

Fixed version (ground truth):
public void setPlayerSize(EntityPlayer p,float x,float y,float offset,float height){
  AxisAlignedBB axisalignedbb=p.getEntityBoundingBox();
  p.setEntityBoundingBox(new AxisAlignedBB(axisalignedbb.minX,axisalignedbb.minY,axisalignedbb.minZ,axisalignedbb.minX + (double)x,axisalignedbb.minY + (double)y,axisalignedbb.minZ + (double)x));
  if (Tropicraft.proxy.helloIsItMeYoureLookingFor(p)) {
    p.posY-=offset;
  }
  p.height=height;
}
Program: 109797
Project: 109797
Buggy source:
public BlockTropicraftSlab(Material material,boolean isDoubleSlab){
  super(material);
  this.isDoubleSlab=isDoubleSlab;
  IBlockState iblockstate=this.blockState.getBaseState();
  if (!this.isDouble()) {
    iblockstate=iblockstate.withProperty(HALF,BlockSlab.EnumBlockHalf.BOTTOM);
  }
  this.setDefaultState(iblockstate.withProperty(VARIANT,TropicraftSlabs.BAMBOO));
}

Fixed version (ground truth):
public BlockTropicraftSlab(Material material,boolean isDoubleSlab){
  super(material);
  this.isDoubleSlab=isDoubleSlab;
  IBlockState iblockstate=this.blockState.getBaseState();
  if (!this.isDouble()) {
    iblockstate=iblockstate.withProperty(HALF,BlockSlab.EnumBlockHalf.BOTTOM);
  }
  this.setDefaultState(iblockstate.withProperty(VARIANT,TropicraftSlabs.BAMBOO));
  this.useNeighborBrightness=true;
}
Program: 109798
Project: 109798
Buggy source:
public BlockTropicraftStairs(IBlockState modelState){
  super(modelState);
  this.setDefaultState(getDefaultState().withProperty(FACING,EnumFacing.EAST));
}

Fixed version (ground truth):
public BlockTropicraftStairs(IBlockState modelState){
  super(modelState);
  this.setDefaultState(getDefaultState().withProperty(FACING,EnumFacing.EAST));
  this.useNeighborBrightness=true;
}
Program: 109801
Project: 109801
Buggy source:
public BiomeGenTropicraft(BiomeProperties bgprop){
  super(bgprop);
  this.spawnableCreatureList.clear();
  this.spawnableMonsterList.clear();
  this.spawnableCaveCreatureList.clear();
  this.spawnableWaterCreatureList.clear();
  this.theBiomeDecorator=new BiomeDecoratorTropicraft();
  this.spawnableCreatureList.add(new SpawnListEntry(EntityVMonkey.class,20,1,3));
  this.spawnableCreatureList.add(new SpawnListEntry(EntityIguana.class,20,1,1));
  this.spawnableCreatureList.add(new SpawnListEntry(EntityTropiCreeper.class,4,1,2));
  this.spawnableCreatureList.add(new SpawnListEntry(EntityEIH.class,10,1,1));
  this.spawnableCreatureList.add(new SpawnListEntry(EntityTropiSkeleton.class,4,1,8));
  this.spawnableCreatureList.add(new SpawnListEntry(EntityAshenHunter.class,4,3,12));
}

Fixed version (ground truth):
public BiomeGenTropicraft(BiomeProperties bgprop){
  super(bgprop);
  this.spawnableCreatureList.clear();
  this.spawnableMonsterList.clear();
  this.spawnableCaveCreatureList.clear();
  this.spawnableWaterCreatureList.clear();
  this.theBiomeDecorator=new BiomeDecoratorTropicraft();
  this.spawnableCreatureList.add(new SpawnListEntry(EntityVMonkey.class,20,1,3));
  this.spawnableCreatureList.add(new SpawnListEntry(EntityIguana.class,20,1,1));
  this.spawnableCreatureList.add(new SpawnListEntry(EntityTropiCreeper.class,4,1,2));
  this.spawnableCreatureList.add(new SpawnListEntry(EntityEIH.class,10,1,1));
  this.spawnableCreatureList.add(new SpawnListEntry(EntityTropiSkeleton.class,6,2,8));
  this.spawnableCreatureList.add(new SpawnListEntry(EntityAshenHunter.class,4,3,10));
}
Program: 109802
Project: 109802
Buggy source:
public EntityLand(World world){
  super(world);
  setSize(.7F,1.95F);
}

Fixed version (ground truth):
public EntityLand(World world){
  super(world);
  setSize(.7F,1.95F);
  this.enablePersistence();
}
Program: 109803
Project: 109803
Buggy source:
public EntityLandTameable(World world){
  super(world);
  setSize(.7F,1.95F);
}

Fixed version (ground truth):
public EntityLandTameable(World world){
  super(world);
  setSize(.7F,1.95F);
  this.enablePersistence();
}
Program: 109804
Project: 109804
Buggy source:
/** 
 * Updates the task
 */
public void updateTask(){
  double d0=this.entityHost.getDistanceSq(this.attackTarget.posX,this.attackTarget.getEntityBoundingBox().minY,this.attackTarget.posZ);
  boolean flag=this.entityHost.getEntitySenses().canSee(this.attackTarget);
  if (flag) {
    ++this.field_75318_f;
  }
 else {
    this.field_75318_f=0;
  }
  if (d0 <= (double)this.shootCutoffRangeSqr && this.field_75318_f >= 20) {
  }
 else {
  }
  if (this.field_75318_f >= 20) {
    this.entityHost.getNavigator().tryMoveToEntityLiving(this.attackTarget,this.entityMoveSpeed);
  }
  this.entityHost.getLookHelper().setLookPositionWithEntity(this.attackTarget,30.0F,30.0F);
  float f;
  if (--this.rangedAttackTime == 0) {
    f=MathHelper.sqrt(d0) / this.shootCutoffRange;
    float f1=f;
    if (f < 0.1F) {
      f1=0.1F;
    }
    if (f1 > 1.0F) {
      f1=1.0F;
    }
    if (d0 >= (double)this.shootCutoffRange) {
      this.rangedAttackEntityHost.attackEntityWithRangedAttack(this.attackTarget,f1);
      this.rangedAttackTime=MathHelper.floor(f * (float)(this.maxRangedAttackTime - this.field_96561_g) + (float)this.field_96561_g);
    }
 else {
      if (d0 <= meleeHitRange) {
        this.entityHost.attackEntityAsMob(attackTarget);
        this.entityHost.swingArm(EnumHand.MAIN_HAND);
        rangedAttackTime=20;
      }
    }
  }
 else   if (this.rangedAttackTime < 0) {
    f=MathHelper.sqrt(d0) / this.shootCutoffRange;
    this.rangedAttackTime=MathHelper.floor(f * (float)(this.maxRangedAttackTime - this.field_96561_g) + (float)this.field_96561_g);
  }
}

Fixed version (ground truth):
/** 
 * Updates the task
 */
public void updateTask(){
  double d0=this.entityHost.getDistanceSq(this.attackTarget.posX,this.attackTarget.getEntityBoundingBox().minY,this.attackTarget.posZ);
  boolean flag=this.entityHost.getEntitySenses().canSee(this.attackTarget);
  if (flag) {
    ++this.field_75318_f;
  }
 else {
    this.field_75318_f=0;
  }
  if (d0 <= (double)this.shootCutoffRangeSqr && this.field_75318_f >= 20) {
  }
 else {
  }
  if (this.field_75318_f >= 20) {
    this.entityHost.getNavigator().tryMoveToEntityLiving(this.attackTarget,this.entityMoveSpeed);
  }
  this.entityHost.getLookHelper().setLookPositionWithEntity(this.attackTarget,30.0F,30.0F);
  float f;
  if (--this.rangedAttackTime <= 0) {
    f=MathHelper.sqrt(d0) / this.shootCutoffRange;
    float f1=f;
    if (f < 0.1F) {
      f1=0.1F;
    }
    if (f1 > 1.0F) {
      f1=1.0F;
    }
    if (d0 >= (double)this.shootCutoffRange * (double)this.shootCutoffRange) {
      this.rangedAttackEntityHost.attackEntityWithRangedAttack(this.attackTarget,f1);
      this.rangedAttackTime=maxRangedAttackTime;
    }
 else     if (d0 <= meleeHitRange * meleeHitRange) {
      this.entityHost.attackEntityAsMob(attackTarget);
      this.entityHost.swingArm(EnumHand.MAIN_HAND);
      rangedAttackTime=maxMeleeAttackTime;
    }
  }
}
Program: 109805
Project: 109805
Buggy source:
public EntityAIMeleeAndRangedAttack(IRangedAttackMob p_i1650_1_,double p_i1650_2_,int p_i1650_4_,int p_i1650_5_,float p_i1650_6_,float meleeHitRange){
  this.rangedAttackTime=-1;
  if (!(p_i1650_1_ instanceof EntityLivingBase)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else {
    this.rangedAttackEntityHost=p_i1650_1_;
    this.entityHost=(EntityLiving)p_i1650_1_;
    this.entityMoveSpeed=p_i1650_2_;
    this.field_96561_g=p_i1650_4_;
    this.maxRangedAttackTime=p_i1650_5_;
    this.shootCutoffRange=p_i1650_6_;
    this.shootCutoffRangeSqr=p_i1650_6_ * p_i1650_6_;
    this.meleeHitRange=meleeHitRange;
    this.setMutexBits(3);
  }
}

Fixed version (ground truth):
public EntityAIMeleeAndRangedAttack(IRangedAttackMob p_i1650_1_,double p_i1650_2_,int maxMeleeAttackTime,int maxRangedAttackTime,float p_i1650_6_,float meleeHitRange){
  this.rangedAttackTime=-1;
  if (!(p_i1650_1_ instanceof EntityLivingBase)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else {
    this.rangedAttackEntityHost=p_i1650_1_;
    this.entityHost=(EntityLiving)p_i1650_1_;
    this.entityMoveSpeed=p_i1650_2_;
    this.maxMeleeAttackTime=maxMeleeAttackTime;
    this.maxRangedAttackTime=maxRangedAttackTime;
    this.shootCutoffRange=p_i1650_6_;
    this.shootCutoffRangeSqr=p_i1650_6_ * p_i1650_6_;
    this.meleeHitRange=meleeHitRange;
    this.setMutexBits(3);
  }
}
Program: 109806
Project: 109806
Buggy source:
@Override protected void applyEntityAttributes(){
  super.applyEntityAttributes();
  this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20.0D);
  this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.4D);
  this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(getAttackStrength());
}

Fixed version (ground truth):
@Override protected void applyEntityAttributes(){
  super.applyEntityAttributes();
  this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20.0D);
  this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.24D);
  this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(getAttackStrength());
}
Program: 109807
Project: 109807
Buggy source:
public EntityAshen(World par1World){
  super(par1World);
  setSize(0.5F,1.3F);
  setMaskType(new Random().nextInt(7));
  actionPicker=0;
}

Fixed version (ground truth):
public EntityAshen(World par1World){
  super(par1World);
  setSize(0.5F,1.3F);
  setMaskType(new Random().nextInt(7));
  actionPicker=0;
  this.enablePersistence();
}
Program: 109808
Project: 109808
Buggy source:
public EntityAshenHunter(World par1World){
  super(par1World);
  swingProgress=0;
  setActionState(2);
  actionPicker=2;
  hasGTFO=false;
  this.setHeldItem(EnumHand.MAIN_HAND,new ItemStack(ItemRegistry.dagger));
  this.tasks.addTask(1,new EntityAISwimming(this));
  this.tasks.addTask(2,new AIAshenChaseAndPickupLostMask(this,1.0D));
  this.tasks.addTask(3,aiArrowAttack);
  this.tasks.addTask(4,new EntityAIMeleeAndRangedAttack(this,1.0D,60,5F));
  this.tasks.addTask(5,new EntityAIWander(this,1.0D));
  this.tasks.addTask(6,new EntityAIWatchClosest(this,EntityPlayer.class,8.0F));
  this.tasks.addTask(7,new EntityAILookIdle(this));
  this.targetTasks.addTask(1,new EntityAIHurtByTarget(this,false));
  this.targetTasks.addTask(2,new EntityAINearestAttackableTarget(this,EntityPlayer.class,true));
  this.targetTasks.addTask(3,new EntityAINearestAttackableTarget(this,EntityKoaBase.class,true));
}

Fixed version (ground truth):
public EntityAshenHunter(World par1World){
  super(par1World);
  swingProgress=0;
  setActionState(2);
  actionPicker=2;
  hasGTFO=false;
  this.setHeldItem(EnumHand.MAIN_HAND,new ItemStack(ItemRegistry.dagger));
  this.tasks.addTask(1,new EntityAISwimming(this));
  this.tasks.addTask(2,new AIAshenChaseAndPickupLostMask(this,1.0D));
  this.tasks.addTask(3,aiArrowAttack);
  this.tasks.addTask(4,new EntityAIMeleeAndRangedAttack(this,1.0D,20 * 2,20 * 10,5F));
  this.tasks.addTask(5,new EntityAIWander(this,1.0D));
  this.tasks.addTask(6,new EntityAIWatchClosest(this,EntityPlayer.class,8.0F));
  this.tasks.addTask(7,new EntityAILookIdle(this));
  this.targetTasks.addTask(1,new EntityAIHurtByTarget(this,false));
  this.targetTasks.addTask(2,new EntityAINearestAttackableTarget(this,EntityPlayer.class,true));
  this.targetTasks.addTask(3,new EntityAINearestAttackableTarget(this,EntityKoaBase.class,true));
}
Program: 109809
Project: 109809
Buggy source:
/** 
 * Checks to make sure the light is not too bright where the mob is spawning
 */
protected boolean isValidLightLevel(){
  BlockPos blockpos=new BlockPos(this.posX,this.getEntityBoundingBox().minY,this.posZ);
  if (this.world.getLightFor(EnumSkyBlock.SKY,blockpos) > this.rand.nextInt(32)) {
    return false;
  }
 else {
    int i=this.world.getLightFromNeighbors(blockpos);
    if (this.world.isThundering()) {
      int j=this.world.getSkylightSubtracted();
      this.world.setSkylightSubtracted(10);
      i=this.world.getLightFromNeighbors(blockpos);
      this.world.setSkylightSubtracted(j);
    }
    return i <= this.rand.nextInt(8);
  }
}

Fixed version (ground truth):
/** 
 * Checks to make sure the light is not too bright where the mob is spawning
 */
protected boolean isValidLightLevel(){
  boolean dayTimeSpawning=true;
  if (dayTimeSpawning) {
    return true;
  }
 else {
    BlockPos blockpos=new BlockPos(this.posX,this.getEntityBoundingBox().minY,this.posZ);
    if (this.world.getLightFor(EnumSkyBlock.SKY,blockpos) > this.rand.nextInt(32)) {
      return false;
    }
 else {
      int i=this.world.getLightFromNeighbors(blockpos);
      if (this.world.isThundering()) {
        int j=this.world.getSkylightSubtracted();
        this.world.setSkylightSubtracted(10);
        i=this.world.getLightFromNeighbors(blockpos);
        this.world.setSkylightSubtracted(j);
      }
      return i <= this.rand.nextInt(8);
    }
  }
}
Program: 109810
Project: 109810
Buggy source:
public EntityFailgull(World world){
  super(world);
  setSize(0.4F,0.6F);
  this.experienceValue=1;
  this.moveHelper=new EntityFailgull.FailgullMoveHelper(this);
}

Fixed version (ground truth):
public EntityFailgull(World world){
  super(world);
  setSize(0.4F,0.6F);
  this.experienceValue=1;
  this.moveHelper=new EntityFailgull.FailgullMoveHelper(this);
  this.enablePersistence();
}
Program: 109812
Project: 109812
Buggy source:
private void replaceBiomeBlocks(int x,int z,ChunkPrimer primer,Biome[] biomesIn){
  if (!net.minecraftforge.event.ForgeEventFactory.onReplaceBiomeBlocks(this,x,z,primer,this.worldObj))   return;
  double d0=0.03125D;
  this.depthBuffer=this.surfaceNoise.getRegion(this.depthBuffer,(double)(x * 16),(double)(z * 16),16,16,d0 * 2.0D,d0 * 2.0D,1.0D);
  int a=-1;
  boolean flag=false;
  int k=(int)63;
  double d=0.03125D;
  for (int xValue=0; xValue < 16; ++xValue) {
    for (int zValue=0; zValue < 16; ++zValue) {
      BiomeGenTropicraft biome=(BiomeGenTropicraft)biomesIn[xValue + zValue * 16];
      int yStart=-1;
      for (int yValue=128 - 1; yValue >= 0; yValue--) {
        int xx=xValue;
        int zz=zValue;
        Block block=primer.getBlockState(xx,yValue,zz).getBlock();
        if (yValue <= 0) {
          primer.setBlockState(xx,yValue,zz,Blocks.BEDROCK.getDefaultState());
          continue;
        }
        if (block == Blocks.AIR || block == BlockRegistry.tropicsWater) {
          a=0;
          continue;
        }
        if (a >= 0 && a < 5) {
          if (yStart == -1) {
            yStart=yValue;
          }
          IBlockState blockUsed=biome.getStateForLayer(yStart,a);
          primer.setBlockState(xx,yValue,zz,blockUsed);
          a++;
        }
 else {
          a=-1;
        }
      }
      a=-1;
    }
  }
}

Fixed version (ground truth):
private void replaceBiomeBlocks(int x,int z,ChunkPrimer primer,Biome[] biomesIn){
  if (!net.minecraftforge.event.ForgeEventFactory.onReplaceBiomeBlocks(this,x,z,primer,this.worldObj))   return;
  double d0=0.03125D;
  this.depthBuffer=this.surfaceNoise.getRegion(this.depthBuffer,(double)(x * 16),(double)(z * 16),16,16,d0 * 2.0D,d0 * 2.0D,1.0D);
  int a=-1;
  boolean flag=false;
  int k=(int)63;
  double d=0.03125D;
  for (int xValue=0; xValue < 16; ++xValue) {
    for (int zValue=0; zValue < 16; ++zValue) {
      Biome biomePreCast=biomesIn[xValue + zValue * 16];
      if (!(biomePreCast instanceof BiomeGenTropicraft))       continue;
      BiomeGenTropicraft biome=(BiomeGenTropicraft)biomePreCast;
      int yStart=-1;
      for (int yValue=128 - 1; yValue >= 0; yValue--) {
        int xx=xValue;
        int zz=zValue;
        Block block=primer.getBlockState(xx,yValue,zz).getBlock();
        if (yValue <= 0) {
          primer.setBlockState(xx,yValue,zz,Blocks.BEDROCK.getDefaultState());
          continue;
        }
        if (block == Blocks.AIR || block == BlockRegistry.tropicsWater) {
          a=0;
          continue;
        }
        if (a >= 0 && a < 5) {
          if (yStart == -1) {
            yStart=yValue;
          }
          IBlockState blockUsed=biome.getStateForLayer(yStart,a);
          primer.setBlockState(xx,yValue,zz,blockUsed);
          a++;
        }
 else {
          a=-1;
        }
      }
      a=-1;
    }
  }
}
Program: 109814
Project: 109814
Buggy source:
/** 
 * Generates a sphere at the specified coordinates
 * @param x The x coordinate
 * @param y The y coordinate
 * @param z The z coordinate
 * @param outerRadius The radius of the sphere's outside edge
 * @param block The block to generate the sphere with
 * @param meta The block metadata to generate the sphere with
 */
public void genSphere(BlockPos pos,int outerRadius,IBlockState state){
  int x=pos.getX();
  int y=pos.getY();
  int z=pos.getZ();
  for (int i=x - outerRadius; i < x + outerRadius; i++) {
    for (int j=y - outerRadius; j < y + outerRadius; j++) {
      for (int k=z - outerRadius; k < z + outerRadius; k++) {
        if (worldObj.isAirBlock(getBlockPos(i,j,k))) {
          int distance1=(i - x) * (i - x) + (j - y) * (j - y) + (k - z) * (k - z);
          if (distance1 <= outerRadius) {
            BlockPos pos2=getBlockPos(i,j,k);
            worldObj.setBlockState(pos2,state,blockGenNotifyFlag);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Generates a sphere at the specified coordinates
 * @param x The x coordinate
 * @param y The y coordinate
 * @param z The z coordinate
 * @param outerRadius The radius of the sphere's outside edge
 * @param block The block to generate the sphere with
 * @param meta The block metadata to generate the sphere with
 */
public void genSphere(BlockPos pos,int outerRadius,IBlockState state){
  int x=pos.getX();
  int y=pos.getY();
  int z=pos.getZ();
  for (int i=x - outerRadius; i < x + outerRadius; i++) {
    for (int j=y - outerRadius; j < y + outerRadius; j++) {
      for (int k=z - outerRadius; k < z + outerRadius; k++) {
        if (worldObj.isAirBlock(TCGenUtils.getBlockPos(i,j,k))) {
          int distance1=(i - x) * (i - x) + (j - y) * (j - y) + (k - z) * (k - z);
          if (distance1 <= outerRadius) {
            BlockPos pos2=TCGenUtils.getBlockPos(i,j,k);
            worldObj.setBlockState(pos2,state,blockGenNotifyFlag);
          }
        }
      }
    }
  }
}
Program: 109816
Project: 109816
Buggy source:
/** 
 * Gets the terrain height at the specified coordinates
 * @param x The x coordinate
 * @param z The z coordinate
 * @return The terrain height at the specified coordinates
 */
public int getTerrainHeightAt(int x,int z){
  int height=worldObj.getHeight(getBlockPos(x,0,z)).getY() + 1;
  for (int y=height; y > 0; y--) {
    Block block=worldObj.getBlockState(getBlockPos(x,y,z)).getBlock();
    if (block == Blocks.DIRT || block == Blocks.GRASS || block == Blocks.SAND || block == Blocks.STONE) {
      return y + 1;
    }
  }
  return 0;
}

Fixed version (ground truth):
/** 
 * Gets the terrain height at the specified coordinates
 * @param x The x coordinate
 * @param z The z coordinate
 * @return The terrain height at the specified coordinates
 */
public int getTerrainHeightAt(int x,int z){
  int height=worldObj.getHeight(TCGenUtils.getBlockPos(x,0,z)).getY() + 1;
  for (int y=height; y > 0; y--) {
    Block block=worldObj.getBlockState(TCGenUtils.getBlockPos(x,y,z)).getBlock();
    if (block == Blocks.DIRT || block == Blocks.GRASS || block == Blocks.SAND || block == Blocks.STONE) {
      return y + 1;
    }
  }
  return 0;
}
Program: 109817
Project: 109817
Buggy source:
@Override public boolean generate(BlockPos pos){
  int i=pos.getX();
  int j=pos.getY();
  int k=pos.getZ();
  j=this.getTerrainHeightAt(i,k);
  pos=new BlockPos(i,j,k);
  if (!worldObj.isAirBlock(pos)) {
    return false;
  }
  int amount=rand.nextInt(MAX_BAMBOO - MIN_BAMBOO) + MIN_BAMBOO;
  int spread=rand.nextInt(3) - 1 + (int)(Math.sqrt(amount) / 2);
  for (int l=0; l < amount; l++) {
    int x=i + rand.nextInt(spread) - rand.nextInt(spread);
    int z=k + rand.nextInt(spread) - rand.nextInt(spread);
    int y=this.getTerrainHeightAt(x,z) - 1;
    int height=rand.nextInt(MAX_HEIGHT - MIN_HEIGHT) + MIN_HEIGHT;
    BlockPos bpos=new BlockPos(x,y,z);
    for (int h=0; h < height; h++) {
      bpos=bpos.up();
      boolean canPlace=BlockRegistry.bambooShoot.canBlockStay(worldObj,bpos);
      if (isAirBlock(bpos) && canPlace) {
        worldObj.setBlockState(bpos,BAMBOO_BLOCK.getDefaultState(),blockGenNotifyFlag);
      }
 else {
        break;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean generate(BlockPos pos){
  int i=pos.getX();
  int j=pos.getY();
  int k=pos.getZ();
  j=this.getTerrainHeightAt(i,k);
  pos=new BlockPos(i,j,k);
  if (!TCGenUtils.isAirBlock(worldObj,pos)) {
    return false;
  }
  int amount=rand.nextInt(MAX_BAMBOO - MIN_BAMBOO) + MIN_BAMBOO;
  int spread=rand.nextInt(3) - 1 + (int)(Math.sqrt(amount) / 2);
  for (int l=0; l < amount; l++) {
    int x=i + rand.nextInt(spread) - rand.nextInt(spread);
    int z=k + rand.nextInt(spread) - rand.nextInt(spread);
    int y=this.getTerrainHeightAt(x,z) - 1;
    int height=rand.nextInt(MAX_HEIGHT - MIN_HEIGHT) + MIN_HEIGHT;
    BlockPos bpos=new BlockPos(x,y,z);
    for (int h=0; h < height; h++) {
      bpos=bpos.up();
      boolean canPlace=BlockRegistry.bambooShoot.canBlockStay(worldObj,bpos);
      if (TCGenUtils.isAirBlock(worldObj,bpos) && canPlace) {
        worldObj.setBlockState(bpos,BAMBOO_BLOCK_STATE,blockGenNotifyFlag);
      }
 else {
        break;
      }
    }
  }
  return true;
}
Program: 109818
Project: 109818
Buggy source:
/** 
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute(){
  BlockPos blockpos=new BlockPos(this.entityObj);
  if ((!this.entityObj.world.isDaytime() || this.entityObj.world.isRaining() && !this.entityObj.world.getBiome(blockpos).canRain()) && !this.entityObj.world.provider.hasNoSky()) {
    if (entityObj.posLastFireplaceFound != null && this.entityObj.getDistanceSq(entityObj.posLastFireplaceFound.getX(),entityObj.posLastFireplaceFound.getY(),entityObj.posLastFireplaceFound.getZ()) < 4.0D) {
      return true;
    }
 else     if (entityObj.posLastFireplaceFound != null && this.entityObj.getDistanceSq(entityObj.posLastFireplaceFound.getX(),entityObj.posLastFireplaceFound.getY(),entityObj.posLastFireplaceFound.getZ()) >= 4.0D) {
      return true;
    }
 else     if (entityObj.posLastFireplaceFound == null) {
      BlockPos pos=Util.findBlock(entityObj,20,Util::isFire);
      if (pos != null) {
        entityObj.setFirelacePos(pos);
        System.out.println("String_Node_Str");
        return true;
      }
 else {
        return false;
      }
    }
  }
 else {
    return false;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute(){
  BlockPos blockpos=new BlockPos(this.entityObj);
  if ((!this.entityObj.world.isDaytime() || this.entityObj.world.isRaining() && !this.entityObj.world.getBiome(blockpos).canRain()) && !this.entityObj.world.provider.hasNoSky()) {
    if (entityObj.posLastFireplaceFound != null && this.entityObj.getDistanceSq(entityObj.posLastFireplaceFound.getX(),entityObj.posLastFireplaceFound.getY(),entityObj.posLastFireplaceFound.getZ()) < 4.0D) {
      return true;
    }
 else     if (entityObj.posLastFireplaceFound != null && this.entityObj.getDistanceSq(entityObj.posLastFireplaceFound.getX(),entityObj.posLastFireplaceFound.getY(),entityObj.posLastFireplaceFound.getZ()) >= 4.0D) {
      return true;
    }
 else     if (entityObj.posLastFireplaceFound == null) {
      BlockPos pos=Util.findBlock(entityObj,20,Util::isFire);
      if (pos != null) {
        pos=pos.add(0,-1,0);
        entityObj.setFirelacePos(pos);
        IBlockState state=entityObj.world.getBlockState(pos);
        System.out.println("String_Node_Str");
        return true;
      }
 else {
        return false;
      }
    }
  }
 else {
    return false;
  }
  return false;
}
Program: 109819
Project: 109819
Buggy source:
/** 
 * Returns whether an in-progress EntityAIBase should continue executing
 */
public boolean continueExecuting(){
  BlockPos blockpos=new BlockPos(this.entityObj);
  if ((!this.entityObj.world.isDaytime() || this.entityObj.world.isRaining() && !this.entityObj.world.getBiome(blockpos).canRain()) && !this.entityObj.world.provider.hasNoSky()) {
    return true;
  }
 else {
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Returns whether an in-progress EntityAIBase should continue executing
 */
public boolean continueExecuting(){
  BlockPos blockpos=new BlockPos(this.entityObj);
  if ((!this.entityObj.world.isDaytime() || this.entityObj.world.isRaining() && !this.entityObj.world.getBiome(blockpos).canRain()) && !this.entityObj.world.provider.hasNoSky()) {
    if (entityObj.posLastFireplaceFound != null) {
      IBlockState state=entityObj.world.getBlockState(entityObj.posLastFireplaceFound);
      if (state.getMaterial() != Material.FIRE) {
        entityObj.posLastFireplaceFound=null;
        return false;
      }
    }
    return true;
  }
 else {
  }
  return false;
}
Program: 109822
Project: 109822
Buggy source:
public void genSchematic(){
  int yOffset=0;
  Build mainStructureData=new Build(spawn.getX(),spawn.getY() + yOffset,spawn.getZ(),CoroUtilFile.getSaveFolderPath() + "String_Node_Str" + File.separator+ "String_Node_Str");
  BuildJob bj=new BuildJob(-99,spawn.getX(),spawn.getY() + yOffset,spawn.getZ(),mainStructureData);
  bj.build.dim=getWorld().provider.getDimension();
  bj.useFirstPass=false;
  bj.useRotationBuild=true;
  bj.build_rate=100;
  bj.notifyFlag=0;
  bj.setDirection(direction);
  bj.customGenCallback=this;
  areaHeight=mainStructureData.map_sizeY;
  BuildServerTicks.buildMan.addBuild(bj);
}

Fixed version (ground truth):
public void genSchematic(){
  int yOffset=0;
  Build mainStructureData=new Build(spawn.getX(),spawn.getY() + yOffset,spawn.getZ(),UtilBuild.getSaveFolderPath() + "String_Node_Str" + File.separator+ "String_Node_Str");
  BuildJob bj=new BuildJob(-99,spawn.getX(),spawn.getY() + yOffset,spawn.getZ(),mainStructureData);
  bj.build.dim=getWorld().provider.getDimension();
  bj.useFirstPass=false;
  bj.useRotationBuild=true;
  bj.build_rate=100;
  bj.notifyFlag=0;
  bj.setDirection(direction);
  bj.customGenCallback=this;
  areaHeight=mainStructureData.map_sizeY;
  BuildServerTicks.buildMan.addBuild(bj);
}
Program: 109823
Project: 109823
Buggy source:
@Override public void spawnMemberAtSpawnLocation(SpawnLocationData parData){
  super.spawnMemberAtSpawnLocation(parData);
  EntityKoaBase ent=null;
  if (parData.type.equals("String_Node_Str")) {
    ent=new EntityKoaFisher(getWorld());
  }
 else   if (parData.type.equals("String_Node_Str")) {
    ent=new EntityKoaHunter(getWorld());
  }
 else   if (parData.type.equals("String_Node_Str")) {
    ent=new EntityKoaTrader(getWorld());
  }
 else   if (parData.type.equals("String_Node_Str")) {
    ent=new EntityKoaShaman(getWorld());
  }
  if (ent != null) {
    ent.getAIAgent().setManagedLocation(this);
    ent.setPosition(spawn.getX() + parData.coords.getX() + 0.5F,spawn.getY() + parData.coords.getY(),spawn.getZ() + parData.coords.getZ() + 0.5F);
    getWorld().spawnEntityInWorld(ent);
    addEntity(parData.type,ent);
    parData.entityUUID=ent.getPersistentID();
    ent.onSpawnWithEgg(null);
  }
}

Fixed version (ground truth):
@Override public void spawnMemberAtSpawnLocation(SpawnLocationData parData){
  super.spawnMemberAtSpawnLocation(parData);
  EntityKoaBase ent=null;
  ent=new EntityKoaHunter(getWorld());
  if (ent != null) {
    ent.setPosition(spawn.getX() + parData.coords.getX() + 0.5F,spawn.getY() + parData.coords.getY(),spawn.getZ() + parData.coords.getZ() + 0.5F);
    getWorld().spawnEntity(ent);
    addEntity(parData.type,ent);
    parData.entityUUID=ent.getPersistentID();
    ent.onInitialSpawn(getWorld().getDifficultyForLocation(ent.getPosition()),null);
  }
}
Program: 109824
Project: 109824
Buggy source:
public static boolean hookTryGenVillage(BlockPos parCoords,World parWorld){
  int directionTry=getBestGenDirection(parCoords,parWorld);
  if (directionTry != -1) {
    System.out.println("String_Node_Str" + directionTry);
    BlockPos centerCoords=getCoordsFromAdjustedDirection(parCoords,directionTry);
    System.out.println("String_Node_Str" + centerCoords);
    TownKoaVillage village=new TownKoaVillage();
    WorldDirector wd=WorldDirectorManager.instance().getCoroUtilWorldDirector(parWorld);
    int minDistBetweenVillages=128;
    Iterator it=wd.lookupTickingManagedLocations.values().iterator();
    while (it.hasNext()) {
      ManagedLocation town=(ManagedLocation)it.next();
      if (Math.sqrt(town.spawn.getDistanceSquaredToBlockPos(parCoords)) < minDistBetweenVillages) {
        return false;
      }
    }
    int newID=wd.lookupTickingManagedLocations.size();
    village.initData(newID,parWorld.provider.dimensionId,centerCoords);
    village.direction=directionTry;
    village.initFirstTime();
    wd.addTickingLocation(village);
    return true;
  }
 else {
  }
  return false;
}

Fixed version (ground truth):
public static boolean hookTryGenVillage(BlockPos parCoords,World parWorld){
  int directionTry=getBestGenDirection(parCoords,parWorld);
  if (directionTry != -1) {
    System.out.println("String_Node_Str" + directionTry);
    BlockPos centerCoords=getCoordsFromAdjustedDirection(parCoords,directionTry);
    System.out.println("String_Node_Str" + centerCoords);
    TownKoaVillage village=new TownKoaVillage();
    return true;
  }
 else {
  }
  return false;
}
Program: 109825
Project: 109825
Buggy source:
public static void init(FMLServerStartingEvent event){
  event.registerServerCommand(new CommandTropicsTeleport());
}

Fixed version (ground truth):
public static void init(FMLServerStartingEvent event){
  event.registerServerCommand(new CommandTropicsTeleport());
  event.registerServerCommand(new CommandTropicsVillage());
}
Program: 109827
Project: 109827
Buggy source:
@Override public void registerItemVariantModel(Item item,String registryName,int metadata,String variantName){
  if (item != null) {
    ModelLoader.setCustomModelResourceLocation(item,metadata,new ModelResourceLocation(Info.MODID + "String_Node_Str" + variantName,null));
  }
}

Fixed version (ground truth):
@Override public void registerItemVariantModel(Item item,String name,int metadata,String variant){
  if (item != null) {
    ModelLoader.setCustomModelResourceLocation(item,metadata,new ModelResourceLocation(Info.MODID + "String_Node_Str" + name,variant));
  }
}
Program: 109828
Project: 109828
Buggy source:
public void registerItemVariantModel(Item item,String registryName,int metadata,String variantName){
}

Fixed version (ground truth):
public void registerItemVariantModel(Item item,String name,int metadata,String variant){
}