nus-yam/ex-repair huggingface dataset:
Program: 156557
Project: 156557
Buggy source:
@Override public List<BakedQuad> renderStaticPluggable(PipeRenderState render,PipePluggableState pluggableState,IPipe pipe,PipePluggable pluggable,EnumFacing face){
  return null;
}

Fixed version (ground truth):
@Override public List<BakedQuad> renderStaticPluggable(IPipeRenderState render,IPipePluggableState pluggableState,IPipe pipe,PipePluggable pluggable,EnumFacing face){
  return null;
}
Program: 156558
Project: 156558
Buggy source:
public boolean linkIsDocked(){
  if (isTaken()) {
    return robotTaking().getDockingStation() == this;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean linkIsDocked(){
  if (robotTaking() != null) {
    return robotTaking().getDockingStation() == this;
  }
 else {
    return false;
  }
}
Program: 156559
Project: 156559
Buggy source:
public TileEntity getTile(boolean forceUpdate){
  if (!Utils.CAULDRON_DETECTED && tile != null && !tile.isInvalid()) {
    return tile;
  }
  if (Utils.CAULDRON_DETECTED || (forceUpdate && tile != null && tile.isInvalid()) || tracker.markTimeIfDelay(world)) {
    refresh();
    if (tile != null && !tile.isInvalid()) {
      return tile;
    }
  }
  return null;
}

Fixed version (ground truth):
public TileEntity getTile(boolean forceUpdate){
  refresh();
  return tile;
}
Program: 156560
Project: 156560
Buggy source:
public void refresh(){
  tile=null;
  state=null;
  if (!loadUnloaded && world.isAirBlock(pos)) {
    return;
  }
  state=world.getBlockState(pos);
  if (state != null && state.getBlock().hasTileEntity(state)) {
    tile=world.getTileEntity(pos);
  }
}

Fixed version (ground truth):
public void refresh(){
  tile=null;
  state=null;
  state=world.getBlockState(pos);
  tile=world.getTileEntity(pos);
}
Program: 156561
Project: 156561
Buggy source:
public boolean exists(){
  if (tile != null && !Utils.CAULDRON_DETECTED && !tile.isInvalid()) {
    return true;
  }
  return !world.isAirBlock(pos);
}

Fixed version (ground truth):
public boolean exists(){
  return !world.isAirBlock(pos);
}
Program: 156562
Project: 156562
Buggy source:
private void tryRefresh(){
  if (Utils.CAULDRON_DETECTED || (tile != null && tile.isInvalid()) || (tile == null && tracker.markTimeIfDelay(world))) {
    refresh();
  }
}

Fixed version (ground truth):
private void tryRefresh(){
  refresh();
}
Program: 156564
Project: 156564
Buggy source:
/** 
 * UniqueTag accepts multiple possible tags, use this feature to migrate to more standardized tags if needed, otherwise just pass a single string. The first passed string will be the one used when saved to disk. The ResourceLocation is the location of the icon to be displayed for this statement
 * @param uniqueTag 
 */
protected BCStatement(ResourceLocation loc,String... uniqueTag){
  this.uniqueTag=uniqueTag[0];
  for (  String tag : uniqueTag) {
    StatementManager.statements.put(tag,this);
  }
  location=loc;
  MinecraftForge.EVENT_BUS.register(this);
}

Fixed version (ground truth):
/** 
 * UniqueTag accepts multiple possible tags, use this feature to migrate to more standardized tags if needed, otherwise just pass a single string. The first passed string will be the one used when saved to disk.
 * @deprecated use the above one, and set the ResourceLocation seperately
 * @param uniqueTag 
 */
protected BCStatement(ResourceLocation loc,String... uniqueTag){
  this.uniqueTag=uniqueTag[0];
  for (  String tag : uniqueTag) {
    StatementManager.statements.put(tag,this);
  }
  location=loc;
  MinecraftForge.EVENT_BUS.register(this);
}
Program: 156565
Project: 156565
Buggy source:
protected void computeConnections(){
  TileBuffer[] cache=getTileCache();
  if (cache == null) {
    return;
  }
  for (  EnumFacing side : EnumFacing.VALUES) {
    TileBuffer t=cache[side.ordinal()];
    if (t.exists() || !initialized) {
      t.refresh();
      pipeConnectionsBuffer[side.ordinal()]=canPipeConnect(t.getTile(),side);
    }
  }
}

Fixed version (ground truth):
protected void computeConnections(){
  TileBuffer[] cache=getTileCache();
  if (cache == null) {
    return;
  }
  for (  EnumFacing side : EnumFacing.VALUES) {
    TileBuffer t=cache[side.ordinal()];
    pipeConnectionsBuffer[side.ordinal()]=canPipeConnect(worldObj.getTileEntity(pos.offset(side)),side);
  }
}
Program: 156566
Project: 156566
Buggy source:
public void writeToNBT(NBTTagCompound data){
  data.setDouble("String_Node_Str",xCoord);
  data.setDouble("String_Node_Str",yCoord);
  data.setDouble("String_Node_Str",zCoord);
  data.setFloat("String_Node_Str",getSpeed());
  NBTTagCompound itemStackTag=new NBTTagCompound();
  getItemStack().writeToNBT(itemStackTag);
  data.setTag("String_Node_Str",itemStackTag);
  data.setBoolean("String_Node_Str",toCenter);
  data.setByte("String_Node_Str",(byte)input.ordinal());
  data.setByte("String_Node_Str",(byte)output.ordinal());
  data.setByte("String_Node_Str",color != null ? (byte)color.ordinal() : -1);
  if (extraData != null) {
    data.setTag("String_Node_Str",extraData);
  }
}

Fixed version (ground truth):
public void writeToNBT(NBTTagCompound data){
  data.setDouble("String_Node_Str",pos.xCoord);
  data.setDouble("String_Node_Str",pos.yCoord);
  data.setDouble("String_Node_Str",pos.zCoord);
  data.setFloat("String_Node_Str",getSpeed());
  NBTTagCompound itemStackTag=new NBTTagCompound();
  getItemStack().writeToNBT(itemStackTag);
  data.setTag("String_Node_Str",itemStackTag);
  data.setBoolean("String_Node_Str",toCenter);
  data.setByte("String_Node_Str",(byte)input.ordinal());
  data.setByte("String_Node_Str",(byte)output.ordinal());
  data.setByte("String_Node_Str",color != null ? (byte)color.ordinal() : -1);
  if (extraData != null) {
    data.setTag("String_Node_Str",extraData);
  }
}
Program: 156567
Project: 156567
Buggy source:
public EntityItem toEntityItem(){
  if (container != null && !container.getWorld().isRemote) {
    if (getItemStack().stackSize <= 0) {
      return null;
    }
    Vec3 motion=Utils.convert(output,0.1 + getSpeed() * 2D);
    EntityItem entity=new EntityItem(container.getWorld(),xCoord,yCoord,zCoord,getItemStack());
    entity.lifespan=BuildCraftCore.itemLifespan * 20;
    entity.setDefaultPickupDelay();
    float f3=0.00F + container.getWorld().rand.nextFloat() * 0.04F - 0.02F;
    entity.motionX=(float)container.getWorld().rand.nextGaussian() * f3 + motion.xCoord;
    entity.motionY=(float)container.getWorld().rand.nextGaussian() * f3 + motion.yCoord;
    entity.motionZ=(float)container.getWorld().rand.nextGaussian() * f3 + +motion.zCoord;
    return entity;
  }
  return null;
}

Fixed version (ground truth):
public EntityItem toEntityItem(){
  if (container != null && !container.getWorld().isRemote) {
    if (getItemStack().stackSize <= 0) {
      return null;
    }
    Vec3 motion=Utils.convert(output,0.1 + getSpeed() * 2D);
    EntityItem entity=new EntityItem(container.getWorld(),pos.xCoord,pos.yCoord,pos.zCoord,getItemStack());
    entity.lifespan=BuildCraftCore.itemLifespan * 20;
    entity.setDefaultPickupDelay();
    float f3=0.00F + container.getWorld().rand.nextFloat() * 0.04F - 0.02F;
    entity.motionX=(float)container.getWorld().rand.nextGaussian() * f3 + motion.xCoord;
    entity.motionY=(float)container.getWorld().rand.nextGaussian() * f3 + motion.yCoord;
    entity.motionZ=(float)container.getWorld().rand.nextGaussian() * f3 + +motion.zCoord;
    return entity;
  }
  return null;
}
Program: 156569
Project: 156569
Buggy source:
public BlockGenericPipe(){
  super(Material.glass,GENERIC_PIPE_DATA);
  setCreativeTab(null);
}

Fixed version (ground truth):
public BlockGenericPipe(){
  super(Material.glass,GENERIC_PIPE_DATA,CONNECTED_UP,CONNECTED_DOWN,CONNECTED_EAST,CONNECTED_WEST,CONNECTED_NORTH,CONNECTED_SOUTH);
  setCreativeTab(null);
  setLightOpacity(0);
}
Program: 156570
Project: 156570
Buggy source:
@Override public void readData(ByteBuf data){
  itemPos=new Vec3(data.readFloat(),data.readFloat(),data.readFloat());
  pos=Utils.convertFloor(itemPos);
  this.entityId=data.readShort();
  int flags=data.readUnsignedByte();
  this.input=EnumFacing.getFront((flags >> 3) & 7);
  this.output=EnumFacing.getFront(flags & 7);
  byte c=data.readByte();
  if (c != -1) {
    this.color=EnumColor.fromId(c);
  }
  this.speed=data.readFloat();
  this.forceStackRefresh=(flags & 0x40) > 0;
}

Fixed version (ground truth):
@Override public void readData(ByteBuf data){
  itemPos=new Vec3(data.readFloat(),data.readFloat(),data.readFloat());
  pos=Utils.convertFloor(itemPos);
  this.entityId=data.readShort();
  int flags=data.readUnsignedByte();
  int in=(flags >> 3) & 7;
  if (in == 6) {
    this.input=null;
  }
 else {
    this.input=EnumFacing.getFront(in);
  }
  int out=flags & 7;
  if (out == 6) {
    this.output=null;
  }
 else {
    this.output=EnumFacing.getFront(out);
  }
  byte c=data.readByte();
  if (c != -1) {
    this.color=EnumColor.fromId(c);
  }
  this.speed=data.readFloat();
  this.forceStackRefresh=(flags & 0x40) > 0;
}
Program: 156571
Project: 156571
Buggy source:
@Override public void writeData(ByteBuf data){
  data.writeFloat((float)item.pos.xCoord);
  data.writeFloat((float)item.pos.yCoord);
  data.writeFloat((float)item.pos.zCoord);
  data.writeShort(item.id);
  byte flags=(byte)((item.output.ordinal() & 7) | ((item.input.ordinal() & 7) << 3) | (forceStackRefresh ? 64 : 0));
  data.writeByte(flags);
  data.writeByte(item.color != null ? item.color.ordinal() : -1);
  data.writeFloat(item.getSpeed());
}

Fixed version (ground truth):
@Override public void writeData(ByteBuf data){
  data.writeFloat((float)item.pos.xCoord);
  data.writeFloat((float)item.pos.yCoord);
  data.writeFloat((float)item.pos.zCoord);
  data.writeShort(item.id);
  int out=item.output == null ? 6 : item.output.ordinal();
  int in=item.input == null ? 6 : item.input.ordinal();
  byte flags=(byte)((out & 7) | ((in & 7) << 3) | (forceStackRefresh ? 64 : 0));
  data.writeByte(flags);
  data.writeByte(item.color != null ? item.color.ordinal() : -1);
  data.writeFloat(item.getSpeed());
}
Program: 156572
Project: 156572
Buggy source:
public boolean linkIsDocked(){
  if (isTaken()) {
    return robotTaking().getDockingStation() == this;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean linkIsDocked(){
  if (robotTaking() != null) {
    return robotTaking().getDockingStation() == this;
  }
 else {
    return false;
  }
}
Program: 156573
Project: 156573
Buggy source:
@Override public void start(){
  if (robot.getDockingStation() != null && filter.matches(robot.getDockingStation())) {
    targetStation=robot.getDockingStation();
    terminate();
    return;
  }
  double potentialStationDistance=Float.MAX_VALUE;
  DockingStation potentialStation=null;
  for (  DockingStation station : robot.getRegistry().getStations()) {
    if (station.isTaken() && station.robotIdTaking() != robot.getRobotId()) {
      continue;
    }
    if (zone != null && !zone.contains(station.x(),station.y(),station.z())) {
      continue;
    }
    if (filter.matches(station)) {
      if (ActionStationForbidRobot.isForbidden(station,robot)) {
        continue;
      }
      double dx=robot.posX - station.x();
      double dy=robot.posY - station.y();
      double dz=robot.posZ - station.z();
      double distance=dx * dx + dy * dy + dz * dz;
      if (potentialStation == null || distance < potentialStationDistance) {
        potentialStation=station;
        potentialStationDistance=distance;
      }
    }
  }
  if (potentialStation != null) {
    targetStation=potentialStation;
  }
  terminate();
}

Fixed version (ground truth):
@Override public void start(){
  if (robot.getDockingStation() != null && filter.matches(robot.getDockingStation())) {
    targetStation=robot.getDockingStation();
    terminate();
    return;
  }
  double potentialStationDistance=Float.MAX_VALUE;
  DockingStation potentialStation=null;
  for (  DockingStation station : robot.getRegistry().getStations()) {
    if (!station.isInitialized()) {
      continue;
    }
    if (station.isTaken() && station.robotIdTaking() != robot.getRobotId()) {
      continue;
    }
    if (zone != null && !zone.contains(station.x(),station.y(),station.z())) {
      continue;
    }
    if (filter.matches(station)) {
      if (ActionStationForbidRobot.isForbidden(station,robot)) {
        continue;
      }
      double dx=robot.posX - station.x();
      double dy=robot.posY - station.y();
      double dz=robot.posZ - station.z();
      double distance=dx * dx + dy * dy + dz * dz;
      if (potentialStation == null || distance < potentialStationDistance) {
        potentialStation=station;
        potentialStationDistance=distance;
      }
    }
  }
  if (potentialStation != null) {
    targetStation=potentialStation;
  }
  terminate();
}
Program: 156574
Project: 156574
Buggy source:
@Override public void getDebugInfo(List<String> left,List<String> right,EnumFacing side){
  left.add("String_Node_Str");
  left.add("String_Node_Str" + maxPower + "String_Node_Str");
  left.add("String_Node_Str" + Arrays.toString(internalPower) + "String_Node_Str"+ Arrays.toString(internalNextPower));
  left.add("String_Node_Str" + Arrays.toString(powerQuery) + "String_Node_Str"+ Arrays.toString(nextPowerQuery));
  left.add("String_Node_Str" + Arrays.toString(dbgEnergyInput) + "String_Node_Str"+ Arrays.toString(dbgEnergyOutput));
  left.add("String_Node_Str" + Arrays.toString(dbgEnergyOffered));
  int[] totalPowerQuery=new int[6];
  for (int i=0; i < 6; ++i) {
    if (internalPower[i] > 0) {
      for (int j=0; j < 6; ++j) {
        if (j != i && powerQuery[j] > 0) {
          Object ep=providers[j];
          if (ep instanceof IPipeTile || ep instanceof IEnergyReceiver || ep instanceof IEnergyHandler) {
            totalPowerQuery[i]+=powerQuery[j];
          }
        }
      }
    }
  }
  left.add("String_Node_Str" + Arrays.toString(totalPowerQuery));
}

Fixed version (ground truth):
@Override public void getDebugInfo(List<String> left,List<String> right,EnumFacing side){
  left.add("String_Node_Str");
  left.add("String_Node_Str" + maxPower + "String_Node_Str");
  for (  EnumFacing face : EnumFacing.VALUES) {
    int ord=face.ordinal();
    left.add("String_Node_Str" + face.getName2() + "String_Node_Str"+ displayPower[ord]+ "String_Node_Str");
  }
}
Program: 156575
Project: 156575
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void renderTileEntityAt(TileEntity tileentity,double x,double y,double z,float f,int argumentthatisalwaysminusone){
  if (BuildCraftCore.render == RenderMode.NoDynamic) {
    return;
  }
  TileGenericPipe pipe=(TileGenericPipe)tileentity;
  if (pipe.pipe == null) {
    return;
  }
  renderGatesWires(pipe,x,y,z);
  renderPluggables(pipe,x,y,z);
  IPipeTile.PipeType pipeType=pipe.getPipeType();
  if (pipeType == IPipeTile.PipeType.ITEM) {
    renderSolids((Pipe<PipeTransportItems>)pipe.pipe,x,y,z,f);
  }
 else   if (pipeType == IPipeTile.PipeType.FLUID) {
    renderFluids((Pipe<PipeTransportFluids>)pipe.pipe,x,y,z);
  }
 else   if (pipeType == IPipeTile.PipeType.POWER) {
    renderPower((Pipe<PipeTransportPower>)pipe.pipe,x,y,z);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void renderTileEntityAt(TileEntity tileentity,double x,double y,double z,float f,int argumentthatisalwaysminusone){
  if (BuildCraftCore.render == RenderMode.NoDynamic) {
    return;
  }
  TileGenericPipe pipe=(TileGenericPipe)tileentity;
  if (pipe.pipe == null) {
    return;
  }
  renderGatesWires(pipe,x,y,z);
  renderPluggables(pipe,x,y,z);
  IPipeTile.PipeType pipeType=pipe.getPipeType();
  if (pipeType == IPipeTile.PipeType.ITEM) {
    renderSolids((Pipe<PipeTransportItems>)pipe.pipe,x,y,z,f);
  }
 else   if (pipeType == IPipeTile.PipeType.FLUID) {
  }
 else   if (pipeType == IPipeTile.PipeType.POWER) {
  }
}
Program: 156576
Project: 156576
Buggy source:
@Override public boolean onItemUse(ItemStack stack,EntityPlayer player,World world,BlockPos pos,EnumFacing side,float hitX,float hitY,float hitZ){
  TileEntity tile=world.getTileEntity(pos);
  if (tile instanceof IDebuggable) {
    ArrayList<String> info=new ArrayList<String>();
    String effSide=FMLCommonHandler.instance().getEffectiveSide().name().substring(0,1) + "String_Node_Str";
    ((IDebuggable)tile).getDebugInfo(info);
    for (    String s : info) {
      player.addChatComponentMessage(new ChatComponentText(effSide + s));
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onItemUse(ItemStack stack,EntityPlayer player,World world,BlockPos pos,EnumFacing side,float hitX,float hitY,float hitZ){
  return false;
}
Program: 156577
Project: 156577
Buggy source:
@Override public void update(){
  if (!init && !isInvalid()) {
    initialize();
    init=true;
  }
  if (battery != null) {
    receivedTick=0;
    extractedTick=0;
    if (!worldObj.isRemote) {
      int prePower=ledPower;
      int stored=battery.getEnergyStored();
      int max=battery.getMaxEnergyStored();
      ledPower=0;
      if (stored != 0) {
        ledPower=stored * 2 / max + 1;
      }
      if (prePower != ledPower) {
        sendNetworkUpdate();
      }
    }
  }
}

Fixed version (ground truth):
@Override public void update(){
  if (init != 2 && !isInvalid()) {
    if (init < 2) {
      init++;
      return;
    }
    initialize();
    init=2;
  }
  if (battery != null) {
    receivedTick=0;
    extractedTick=0;
    if (!worldObj.isRemote) {
      int prePower=ledPower;
      int stored=battery.getEnergyStored();
      int max=battery.getMaxEnergyStored();
      ledPower=0;
      if (stored != 0) {
        ledPower=stored * 2 / max + 1;
      }
      if (prePower != ledPower) {
        sendNetworkUpdate();
      }
    }
  }
}
Program: 156578
Project: 156578
Buggy source:
@Override public void invalidate(){
  init=false;
  super.invalidate();
  cache=null;
}

Fixed version (ground truth):
@Override public void invalidate(){
  init=0;
  super.invalidate();
  cache=null;
}
Program: 156579
Project: 156579
Buggy source:
public static int[] getFluidDisplayLists(FluidStack fluidStack,boolean flowing,Vec3 size){
  if (fluidStack == null) {
    return null;
  }
  Fluid fluid=fluidStack.getFluid();
  if (fluid == null) {
    return null;
  }
  Map<Fluid,Map<Vec3,int[]>> cache=flowing ? flowingRenderCache : stillRenderCache;
  Map<Vec3,int[]> displayLists=cache.get(fluid);
  int[] displayList;
  if (displayLists != null) {
    displayList=displayLists.get(size);
    if (displayList != null) {
      return displayList;
    }
  }
 else {
    displayLists=Maps.newHashMap();
    cache.put(fluid,displayLists);
  }
  displayList=new int[DISPLAY_STAGES];
  cache.put(fluid,displayLists);
  GlStateManager.disableLighting();
  GlStateManager.disableBlend();
  GlStateManager.disableCull();
  for (int s=0; s < DISPLAY_STAGES; ++s) {
    displayList[s]=GLAllocation.generateDisplayLists(1);
    GL11.glNewList(displayList[s],GL11.GL_COMPILE);
    EntityResizableCuboid ent=new EntityResizableCuboid(null);
    ent.iSize=size.xCoord;
    ent.jSize=(Math.max(s,1) / (float)DISPLAY_STAGES) * size.yCoord;
    ent.kSize=size.zCoord;
    ent.texture=getFluidTexture(fluidStack,flowing);
    GL11.glTranslated(0.01,0.01,0.01);
    RenderResizableCuboid.INSTANCE.renderCube(ent);
    GL11.glTranslated(-0.01,-0.01,-0.01);
    GL11.glEndList();
  }
  GlStateManager.color(1,1,1,1);
  GlStateManager.enableLighting();
  GlStateManager.enableBlend();
  GlStateManager.enableCull();
  displayLists.put(size,displayList);
  return displayList;
}

Fixed version (ground truth):
public static int[] getFluidDisplayLists(FluidStack fluidStack,boolean flowing,Vec3 size){
  if (fluidStack == null) {
    return null;
  }
  Fluid fluid=fluidStack.getFluid();
  if (fluid == null) {
    return null;
  }
  Map<Fluid,Map<Vec3,int[]>> cache=flowing ? flowingRenderCache : stillRenderCache;
  Map<Vec3,int[]> displayLists=cache.get(fluid);
  int[] displayList;
  if (displayLists != null) {
    displayList=displayLists.get(size);
    if (displayList != null) {
      return displayList;
    }
  }
 else {
    displayLists=Maps.newHashMap();
    cache.put(fluid,displayLists);
  }
  displayList=new int[DISPLAY_STAGES];
  cache.put(fluid,displayLists);
  GlStateManager.disableLighting();
  GlStateManager.disableBlend();
  GlStateManager.disableCull();
  for (int s=0; s < DISPLAY_STAGES; ++s) {
    displayList[s]=GLAllocation.generateDisplayLists(1);
    GL11.glNewList(displayList[s],GL11.GL_COMPILE);
    EntityResizableCuboid ent=new EntityResizableCuboid(null);
    ent.iSize=size.xCoord;
    ent.jSize=(Math.max(s,1) / (float)DISPLAY_STAGES) * size.yCoord;
    ent.kSize=size.zCoord;
    ent.texture=getFluidTexture(fluidStack,flowing);
    RenderResizableCuboid.INSTANCE.renderCube(ent);
    GL11.glEndList();
  }
  GlStateManager.color(1,1,1,1);
  GlStateManager.enableLighting();
  GlStateManager.enableBlend();
  GlStateManager.enableCull();
  displayLists.put(size,displayList);
  return displayList;
}
Program: 156581
Project: 156581
Buggy source:
@Override public void renderTileEntityAt(TileEntity tileentity,double x,double y,double z,float f,int minusOne){
  TileTank tank=(TileTank)tileentity;
  FluidStack liquid=tank.tank.getFluid();
  int color=tank.tank.colorRenderCache;
  if (liquid == null || liquid.amount <= 0) {
    return;
  }
  int[] displayList=FluidRenderer.getFluidDisplayLists(liquid,false,TANK_SIZE);
  if (displayList == null) {
    return;
  }
  GL11.glPushMatrix();
  GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
  GL11.glEnable(GL11.GL_CULL_FACE);
  GL11.glDisable(GL11.GL_LIGHTING);
  GL11.glEnable(GL11.GL_BLEND);
  GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
  bindTexture(TextureMap.locationBlocksTexture);
  RenderUtils.setGLColorFromInt(color);
  GL11.glTranslatef((float)x + 0.5F,(float)y + 0.5F,(float)z + 0.5F);
  GL11.glScalef(0.999F,0.999F,0.999F);
  GL11.glTranslatef(-0.25F,-0.5F,-0.25F);
  GL11.glCallList(displayList[(int)((float)liquid.amount / (float)(tank.tank.getCapacity()) * (FluidRenderer.DISPLAY_STAGES - 1))]);
  GL11.glPopAttrib();
  GL11.glPopMatrix();
}

Fixed version (ground truth):
@Override public void renderTileEntityAt(TileEntity tileentity,double x,double y,double z,float f,int minusOne){
  TileTank tank=(TileTank)tileentity;
  FluidStack liquid=tank.tank.getFluid();
  int color=tank.tank.colorRenderCache;
  if (liquid == null || liquid.amount <= 0) {
    return;
  }
  int[] displayList=FluidRenderer.getFluidDisplayLists(liquid,false,TANK_SIZE);
  if (displayList == null) {
    return;
  }
  GL11.glPushMatrix();
  GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
  GL11.glEnable(GL11.GL_CULL_FACE);
  GL11.glDisable(GL11.GL_LIGHTING);
  GL11.glEnable(GL11.GL_BLEND);
  GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
  bindTexture(TextureMap.locationBlocksTexture);
  RenderUtils.setGLColorFromInt(color);
  GL11.glTranslatef((float)x + 0.5F,(float)y + 0.5F,(float)z + 0.5F);
  GL11.glScalef(0.999F,0.999F,0.999F);
  GL11.glTranslatef(-0.375F,-0.5F,-0.375F);
  GL11.glCallList(displayList[(int)((float)liquid.amount / (float)(tank.tank.getCapacity()) * (FluidRenderer.DISPLAY_STAGES - 1))]);
  GL11.glPopAttrib();
  GL11.glPopMatrix();
}
Program: 156582
Project: 156582
Buggy source:
@Override public void getDebugInfo(List<String> left,List<String> right,EnumFacing side){
  left.add("String_Node_Str");
  left.add("String_Node_Str");
  left.add("String_Node_Str" + tanks[0].getFluidAmount() + "String_Node_Str"+ tanks[0].getCapacity()+ "String_Node_Str");
  left.add("String_Node_Str" + (tanks[0].getFluid() == null ? "String_Node_Str" : tanks[0].getFluidType().getLocalizedName(tanks[0].getFluid())));
  left.add("String_Node_Str");
  left.add("String_Node_Str" + tanks[1].getFluidAmount() + "String_Node_Str"+ tanks[1].getCapacity()+ "String_Node_Str");
  left.add("String_Node_Str" + (tanks[1].getFluid() == null ? "String_Node_Str" : tanks[0].getFluidType().getLocalizedName(tanks[1].getFluid())));
  left.add("String_Node_Str");
  left.add("String_Node_Str" + result.getFluidAmount() + "String_Node_Str"+ result.getCapacity()+ "String_Node_Str");
  left.add("String_Node_Str" + (result.getFluid() == null ? "String_Node_Str" : result.getFluidType().getLocalizedName(result.getFluid())));
}

Fixed version (ground truth):
@Override public void getDebugInfo(List<String> left,List<String> right,EnumFacing side){
  left.add("String_Node_Str");
  left.add("String_Node_Str");
  left.add("String_Node_Str" + tanks[0].getFluidAmount() + "String_Node_Str"+ tanks[0].getCapacity()+ "String_Node_Str");
  left.add("String_Node_Str" + (tanks[0].getFluid() == null ? "String_Node_Str" : tanks[0].getFluidType().getLocalizedName(tanks[0].getFluid())));
  left.add("String_Node_Str");
  left.add("String_Node_Str" + tanks[1].getFluidAmount() + "String_Node_Str"+ tanks[1].getCapacity()+ "String_Node_Str");
  left.add("String_Node_Str" + (tanks[1].getFluid() == null ? "String_Node_Str" : tanks[1].getFluidType().getLocalizedName(tanks[1].getFluid())));
  left.add("String_Node_Str");
  left.add("String_Node_Str" + result.getFluidAmount() + "String_Node_Str"+ result.getCapacity()+ "String_Node_Str");
  left.add("String_Node_Str" + (result.getFluid() == null ? "String_Node_Str" : result.getFluidType().getLocalizedName(result.getFluid())));
}
Program: 156583
Project: 156583
Buggy source:
@SubscribeEvent @SideOnly(Side.CLIENT) public void renderOverlay(RenderGameOverlayEvent.Text event){
  if (Minecraft.getMinecraft().thePlayer.hasReducedDebug() || Minecraft.getMinecraft().gameSettings.reducedDebugInfo) {
    return;
  }
  MovingObjectPosition object=Minecraft.getMinecraft().objectMouseOver;
  MovingObjectType type=object.typeOfHit;
  if (type == MovingObjectType.BLOCK && object.getBlockPos() != null) {
    BlockPos pos=object.getBlockPos();
    TileEntity tile=Minecraft.getMinecraft().theWorld.getTileEntity(pos);
    if (tile instanceof IDebuggable && tile != null) {
      ((IDebuggable)tile).getDebugInfo(event.left,event.right,object.sideHit);
    }
  }
 else   if (type == MovingObjectType.ENTITY) {
  }
}

Fixed version (ground truth):
@SubscribeEvent @SideOnly(Side.CLIENT) public void renderOverlay(RenderGameOverlayEvent.Text event){
  Minecraft mc=Minecraft.getMinecraft();
  if (!mc.gameSettings.showDebugInfo)   return;
  if (mc.thePlayer.hasReducedDebug() || mc.gameSettings.reducedDebugInfo) {
    return;
  }
  MovingObjectPosition object=mc.objectMouseOver;
  MovingObjectType type=object.typeOfHit;
  if (type == MovingObjectType.BLOCK && object.getBlockPos() != null) {
    BlockPos pos=object.getBlockPos();
    TileEntity tile=mc.theWorld.getTileEntity(pos);
    if (tile instanceof IDebuggable && tile != null) {
      ((IDebuggable)tile).getDebugInfo(event.left,event.right,object.sideHit);
    }
  }
 else   if (type == MovingObjectType.ENTITY) {
  }
}
Program: 156584
Project: 156584
Buggy source:
@Override public void getDebugInfo(List<String> left,List<String> right,EnumFacing side){
  left.add("String_Node_Str");
  left.add("String_Node_Str");
  left.add("String_Node_Str" + tanks[0].getFluidAmount() + "String_Node_Str"+ tanks[0].getCapacity()+ "String_Node_Str");
  left.add("String_Node_Str" + tanks[0].getFluid() == null ? "String_Node_Str" : tanks[0].getFluidType().getLocalizedName(tanks[0].getFluid()));
  left.add("String_Node_Str");
  left.add("String_Node_Str" + tanks[1].getFluidAmount() + "String_Node_Str"+ tanks[1].getCapacity()+ "String_Node_Str");
  left.add("String_Node_Str" + tanks[1].getFluid() == null ? "String_Node_Str" : tanks[0].getFluidType().getLocalizedName(tanks[1].getFluid()));
  left.add("String_Node_Str");
  left.add("String_Node_Str" + result.getFluidAmount() + "String_Node_Str"+ result.getCapacity()+ "String_Node_Str");
  left.add("String_Node_Str" + result.getFluid() == null ? "String_Node_Str" : result.getFluidType().getLocalizedName(result.getFluid()));
}

Fixed version (ground truth):
@Override public void getDebugInfo(List<String> left,List<String> right,EnumFacing side){
  left.add("String_Node_Str");
  left.add("String_Node_Str");
  left.add("String_Node_Str" + tanks[0].getFluidAmount() + "String_Node_Str"+ tanks[0].getCapacity()+ "String_Node_Str");
  left.add("String_Node_Str" + (tanks[0].getFluid() == null ? "String_Node_Str" : tanks[0].getFluidType().getLocalizedName(tanks[0].getFluid())));
  left.add("String_Node_Str");
  left.add("String_Node_Str" + tanks[1].getFluidAmount() + "String_Node_Str"+ tanks[1].getCapacity()+ "String_Node_Str");
  left.add("String_Node_Str" + (tanks[1].getFluid() == null ? "String_Node_Str" : tanks[0].getFluidType().getLocalizedName(tanks[1].getFluid())));
  left.add("String_Node_Str");
  left.add("String_Node_Str" + result.getFluidAmount() + "String_Node_Str"+ result.getCapacity()+ "String_Node_Str");
  left.add("String_Node_Str" + (result.getFluid() == null ? "String_Node_Str" : result.getFluidType().getLocalizedName(result.getFluid())));
}
Program: 156585
Project: 156585
Buggy source:
@Override public void addInformation(ItemStack stack,EntityPlayer player,List list,boolean debug){
  for (  FacadeState state : getFacadeStates(stack)) {
    if (state != null && !state.transparent && state.block != null && Item.getItemFromBlock(state.block) != null) {
      Item.getItemFromBlock(state.block).addInformation(new ItemStack(state.block,1,state.metadata),player,list,debug);
    }
  }
  if (getFacadeType(stack) == FacadeType.Phased) {
    String stateString=StringUtils.localize("String_Node_Str");
    FacadeState defaultState=null;
    for (    FacadeState state : getFacadeStates(stack)) {
      if (state.wire == null) {
        defaultState=state;
        continue;
      }
      list.add(String.format(stateString,state.wire.getColor(),getFacadeStateDisplayName(state)));
    }
    if (defaultState != null) {
      list.add(1,String.format(StringUtils.localize("String_Node_Str"),getFacadeStateDisplayName(defaultState)));
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void addInformation(ItemStack stack,EntityPlayer player,List list,boolean debug){
  for (  FacadeState state : getFacadeStates(stack)) {
    if (state != null && !state.transparent && state.block != null && Item.getItemFromBlock(state.block) != null) {
      Item.getItemFromBlock(state.block).addInformation(new ItemStack(state.block,1,state.metadata),player,list,debug);
    }
  }
  if (getFacadeType(stack) == FacadeType.Phased) {
    String stateString=StringUtils.localize("String_Node_Str");
    FacadeState defaultState=null;
    for (    FacadeState state : getFacadeStates(stack)) {
      if (state.wire == null) {
        defaultState=state;
        continue;
      }
      list.add(String.format(stateString,state.wire.getColor(),getFacadeStateDisplayName(state)));
    }
    if (defaultState != null) {
      list.add(1,String.format(StringUtils.localize("String_Node_Str"),getFacadeStateDisplayName(defaultState)));
    }
  }
}
Program: 156586
Project: 156586
Buggy source:
private void registerValidFacades(Block block,Item item){
  ArrayList<ItemStack> stacks=new ArrayList<ItemStack>(16);
  try {
    if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {
      for (      CreativeTabs ct : item.getCreativeTabs()) {
        block.getSubBlocks(item,ct,stacks);
      }
    }
 else {
      for (int i=0; i < 16; i++) {
        stacks.add(new ItemStack(item,1,i));
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  for (  ItemStack stack : stacks) {
    try {
      int i=stack.getItemDamage();
      if (block.hasTileEntity()) {
        continue;
      }
      try {
        if (stack.getDisplayName() == null || Strings.isNullOrEmpty(stack.getUnlocalizedName())) {
          continue;
        }
      }
 catch (      Throwable t) {
        continue;
      }
      addFacade(stack);
    }
 catch (    IndexOutOfBoundsException e) {
    }
catch (    Throwable t) {
      t.printStackTrace();
    }
  }
}

Fixed version (ground truth):
private void registerValidFacades(Block block,Item item){
  ArrayList<ItemStack> stacks=new ArrayList<ItemStack>(16);
  try {
    if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {
      for (      CreativeTabs ct : item.getCreativeTabs()) {
        block.getSubBlocks(item,ct,stacks);
      }
    }
 else {
      for (int i=0; i < 16; i++) {
        stacks.add(new ItemStack(item,1,i));
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  for (  ItemStack stack : stacks) {
    try {
      if (block.hasTileEntity(block.getDefaultState())) {
        continue;
      }
      try {
        if (stack.getDisplayName() == null || Strings.isNullOrEmpty(stack.getUnlocalizedName())) {
          continue;
        }
      }
 catch (      Throwable t) {
        continue;
      }
      addFacade(stack);
    }
 catch (    IndexOutOfBoundsException e) {
    }
catch (    Throwable t) {
      t.printStackTrace();
    }
  }
}
Program: 156587
Project: 156587
Buggy source:
public void requestPipeExtension(ItemStack stack,World world,BlockPos pos,EnumFacing o,IStripesActivator h){
  if (world.isRemote) {
    return;
  }
  if (!requests.containsKey(world)) {
    requests.put(world,new HashSet<PipeExtensionRequest>());
  }
  PipeExtensionRequest r=new PipeExtensionRequest();
  r.stack=stack;
  r.x=x;
  r.y=y;
  r.z=z;
  r.o=o;
  r.h=h;
  requests.get(world).add(r);
}

Fixed version (ground truth):
public void requestPipeExtension(ItemStack stack,World world,BlockPos pos,EnumFacing o,IStripesActivator h){
  if (world.isRemote) {
    return;
  }
  if (!requests.containsKey(world)) {
    requests.put(world,new HashSet<PipeExtensionRequest>());
  }
  PipeExtensionRequest r=new PipeExtensionRequest();
  r.stack=stack;
  r.pos=pos;
  r.o=o;
  r.h=h;
  requests.get(world).add(r);
}
Program: 156589
Project: 156589
Buggy source:
private void sendItem(PipeTransportItems transport,ItemStack itemStack,EnumFacing direction){
  TravelingItem newItem=TravelingItem.make(transport.container.xCoord + 0.5,transport.container.yCoord + TransportUtils.getPipeFloorOf(itemStack),transport.container.zCoord + 0.5,itemStack);
  transport.injectItem(newItem,direction);
}

Fixed version (ground truth):
private void sendItem(PipeTransportItems transport,ItemStack itemStack,EnumFacing direction){
  Vec3 pos=Utils.convert(transport.container.getPos());
  pos=pos.addVector(0.5,TransportUtils.getPipeFloorOf(itemStack),0.5);
  TravelingItem newItem=TravelingItem.make(pos,itemStack);
  transport.injectItem(newItem,direction);
}
Program: 156590
Project: 156590
Buggy source:
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  EntityArrow entityArrow=new EntityArrow(world,player,0);
  entityArrow.setPosition(x + 0.5d,y + 0.5d,z + 0.5d);
  entityArrow.setDamage(3);
  entityArrow.setKnockbackStrength(1);
  entityArrow.motionX=direction.offsetX * 1.8d + world.rand.nextGaussian() * 0.007499999832361937D;
  entityArrow.motionY=direction.offsetY * 1.8d + world.rand.nextGaussian() * 0.007499999832361937D;
  entityArrow.motionZ=direction.offsetZ * 1.8d + world.rand.nextGaussian() * 0.007499999832361937D;
  world.spawnEntityInWorld(entityArrow);
  stack.stackSize--;
  if (stack.stackSize > 0) {
    activator.sendItem(stack,direction.getOpposite());
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  EntityArrow entityArrow=new EntityArrow(world,player,0);
  entityArrow.setPosition(pos.getX() + 0.5d,pos.getY() + 0.5d,pos.getZ() + 0.5d);
  entityArrow.setDamage(3);
  entityArrow.setKnockbackStrength(1);
  entityArrow.motionX=direction.getFrontOffsetX() * 1.8d + world.rand.nextGaussian() * 0.007499999832361937D;
  entityArrow.motionY=direction.getFrontOffsetY() * 1.8d + world.rand.nextGaussian() * 0.007499999832361937D;
  entityArrow.motionZ=direction.getFrontOffsetZ() * 1.8d + world.rand.nextGaussian() * 0.007499999832361937D;
  world.spawnEntityInWorld(entityArrow);
  stack.stackSize--;
  if (stack.stackSize > 0) {
    activator.sendItem(stack,direction.getOpposite());
  }
  return true;
}
Program: 156591
Project: 156591
Buggy source:
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  Block block=world.getBlock(pos);
  if (block == Blocks.air) {
    Block underblock=world.getBlock(x,y - 1,z);
    if (((ItemBucket)stack.getItem()).tryPlaceContainedLiquid(world,x,y - 1,z)) {
      activator.sendItem(emptyBucket,direction.getOpposite());
      stack.stackSize--;
      if (stack.stackSize > 0) {
        activator.sendItem(stack,direction.getOpposite());
      }
      return true;
    }
 else {
      if (!FluidContainerRegistry.isEmptyContainer(stack)) {
        activator.sendItem(stack,direction.getOpposite());
        return true;
      }
      FluidStack fluidStack=BlockUtils.drainBlock(underblock,world,x,y - 1,z,true);
      ItemStack filledBucket=getFilledBucket(fluidStack,underblock);
      if (fluidStack == null || filledBucket == null) {
        activator.sendItem(stack,direction.getOpposite());
        return true;
      }
      activator.sendItem(filledBucket,direction.getOpposite());
      stack.stackSize--;
      if (stack.stackSize > 0) {
        activator.sendItem(stack,direction.getOpposite());
      }
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  IBlockState state=world.getBlockState(pos);
  Block block=state.getBlock();
  if (block == Blocks.air) {
    IBlockState underblock=world.getBlockState(pos.down());
    if (((ItemBucket)stack.getItem()).tryPlaceContainedLiquid(world,pos.down())) {
      activator.sendItem(emptyBucket,direction.getOpposite());
      stack.stackSize--;
      if (stack.stackSize > 0) {
        activator.sendItem(stack,direction.getOpposite());
      }
      return true;
    }
 else {
      if (!FluidContainerRegistry.isEmptyContainer(stack)) {
        activator.sendItem(stack,direction.getOpposite());
        return true;
      }
      FluidStack fluidStack=BlockUtils.drainBlock(underblock,world,pos.down(),true);
      ItemStack filledBucket=getFilledBucket(fluidStack,underblock.getBlock());
      if (fluidStack == null || filledBucket == null) {
        activator.sendItem(stack,direction.getOpposite());
        return true;
      }
      activator.sendItem(filledBucket,direction.getOpposite());
      stack.stackSize--;
      if (stack.stackSize > 0) {
        activator.sendItem(stack,direction.getOpposite());
      }
      return true;
    }
  }
  return false;
}
Program: 156592
Project: 156592
Buggy source:
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  Vec3 origin=new Vec3(pos,direction);
  origin.moveBackwards(1.0D);
  IBlockSource source=new Source(world,(int)origin.x,(int)origin.y,(int)origin.z,direction);
  IBehaviorDispenseItem behaviour=(IBehaviorDispenseItem)BlockDispenser.dispenseBehaviorRegistry.getObject(stack.getItem());
  if (behaviour != null) {
    ItemStack output=behaviour.dispense(source,stack.copy());
    if (output.stackSize > 0) {
      activator.sendItem(output,direction.getOpposite());
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  Vec3 origin=Utils.convert(pos).add(Utils.convert(direction,-1));
  IBlockSource source=new Source(world,Utils.convertFloor(origin),direction);
  IBehaviorDispenseItem behaviour=(IBehaviorDispenseItem)BlockDispenser.dispenseBehaviorRegistry.getObject(stack.getItem());
  if (behaviour != null) {
    ItemStack output=behaviour.dispense(source,stack.copy());
    if (output.stackSize > 0) {
      activator.sendItem(output,direction.getOpposite());
    }
    return true;
  }
  return false;
}
Program: 156593
Project: 156593
Buggy source:
public Source(World world,BlockPos pos,EnumFacing side){
  this.world=world;
  this.x=x;
  this.y=y;
  this.z=z;
  this.side=side;
}

Fixed version (ground truth):
public Source(World world,BlockPos pos,EnumFacing side){
  this.world=world;
  this.pos=pos;
  this.side=side;
}
Program: 156594
Project: 156594
Buggy source:
@Override public boolean shouldHandle(ItemStack stack){
  if (items.contains(stack.getItem())) {
    return true;
  }
  Class c=stack.getItem().getClass();
  while (c != Item.class) {
    if (items.contains(c)) {
      return true;
    }
    c=c.getSuperclass();
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean shouldHandle(ItemStack stack){
  if (items.contains(stack.getItem())) {
    return true;
  }
  Class<?> c=stack.getItem().getClass();
  while (c != Item.class) {
    if (items.contains(c)) {
      return true;
    }
    c=c.getSuperclass();
  }
  return false;
}
Program: 156595
Project: 156595
Buggy source:
@Override public double getX(){
  return (double)x + 0.5D;
}

Fixed version (ground truth):
@Override public double getX(){
  return (double)pos.getX() + 0.5D;
}
Program: 156596
Project: 156596
Buggy source:
@Override public double getY(){
  return (double)y + 0.5D;
}

Fixed version (ground truth):
@Override public double getY(){
  return (double)pos.getY() + 0.5D;
}
Program: 156597
Project: 156597
Buggy source:
@Override public double getZ(){
  return (double)z + 0.5D;
}

Fixed version (ground truth):
@Override public double getZ(){
  return (double)pos.getZ() + 0.5D;
}
Program: 156598
Project: 156598
Buggy source:
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  AxisAlignedBB box=new AxisAlignedBB(pos,x + 1,y + 1,z + 1);
  List entities=world.getEntitiesWithinAABBExcludingEntity(null,box);
  if (entities.size() <= 0) {
    return false;
  }
  List<EntityLivingBase> livingEntities=new LinkedList<EntityLivingBase>();
  for (  Object entityObj : entities) {
    if (entityObj instanceof EntityLivingBase) {
      livingEntities.add((EntityLivingBase)entityObj);
    }
  }
  player.setCurrentItemOrArmor(0,stack);
  boolean successful=false;
  Collections.shuffle(livingEntities);
  while (livingEntities.size() > 0) {
    EntityLivingBase entity=livingEntities.remove(0);
    if (!player.interactWith(entity)) {
      continue;
    }
    successful=true;
    dropItemsExcept(stack,player,activator,direction);
  }
  if (stack.stackSize > 0 && successful) {
    activator.sendItem(stack,direction.getOpposite());
  }
  player.setCurrentItemOrArmor(0,null);
  return successful;
}

Fixed version (ground truth):
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  AxisAlignedBB box=new AxisAlignedBB(pos,pos.add(1,1,1));
  List entities=world.getEntitiesWithinAABBExcludingEntity(null,box);
  if (entities.size() <= 0) {
    return false;
  }
  List<EntityLivingBase> livingEntities=new LinkedList<EntityLivingBase>();
  for (  Object entityObj : entities) {
    if (entityObj instanceof EntityLivingBase) {
      livingEntities.add((EntityLivingBase)entityObj);
    }
  }
  player.setCurrentItemOrArmor(0,stack);
  boolean successful=false;
  Collections.shuffle(livingEntities);
  while (livingEntities.size() > 0) {
    EntityLivingBase entity=livingEntities.remove(0);
    if (!player.interactWith(entity)) {
      continue;
    }
    successful=true;
    dropItemsExcept(stack,player,activator,direction);
  }
  if (stack.stackSize > 0 && successful) {
    activator.sendItem(stack,direction.getOpposite());
  }
  player.setCurrentItemOrArmor(0,null);
  return successful;
}
Program: 156599
Project: 156599
Buggy source:
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  if (!world.isAirBlock(x,y - 1,z) && stack.tryPlaceItemIntoWorld(player,world,x,y - 1,z,1,0.0f,0.0f,0.0f)) {
    if (stack.stackSize > 0) {
      activator.sendItem(stack,direction.getOpposite());
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  if (!world.isAirBlock(pos.down()) && stack.onItemUse(player,world,pos.down(),EnumFacing.DOWN,0.0f,0.0f,0.0f)) {
    if (stack.stackSize > 0) {
      activator.sendItem(stack,direction.getOpposite());
    }
    return true;
  }
  return false;
}
Program: 156600
Project: 156600
Buggy source:
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  AxisAlignedBB box=new AxisAlignedBB(pos,x + 1,y + 1,z + 1);
  List entities=world.getEntitiesWithinAABBExcludingEntity(null,box);
  if (entities.size() <= 0) {
    return false;
  }
  List<EntityMinecart> minecarts=new LinkedList<EntityMinecart>();
  for (  Object entityObj : entities) {
    if (entityObj instanceof EntityMinecart) {
      minecarts.add((EntityMinecart)entityObj);
    }
  }
  if (minecarts.size() > 0) {
    Collections.shuffle(minecarts);
    EntityMinecart cart=minecarts.get(0);
    if (cart instanceof EntityMinecartContainer) {
      EntityMinecartContainer container=(EntityMinecartContainer)cart;
      for (int i=0; i < container.getSizeInventory(); i++) {
        ItemStack s=container.getStackInSlot(i);
        if (s != null) {
          container.setInventorySlotContents(i,null);
          if (container.getStackInSlot(i) == null) {
            activator.sendItem(s,direction.getOpposite());
          }
        }
      }
    }
    cart.setDead();
    activator.sendItem(cart.getCartItem(),direction.getOpposite());
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  AxisAlignedBB box=new AxisAlignedBB(pos,pos.add(1,1,1));
  @SuppressWarnings("String_Node_Str") List entities=world.getEntitiesWithinAABBExcludingEntity(null,box);
  if (entities.size() <= 0) {
    return false;
  }
  List<EntityMinecart> minecarts=new LinkedList<EntityMinecart>();
  for (  Object entityObj : entities) {
    if (entityObj instanceof EntityMinecart) {
      minecarts.add((EntityMinecart)entityObj);
    }
  }
  if (minecarts.size() > 0) {
    Collections.shuffle(minecarts);
    EntityMinecart cart=minecarts.get(0);
    if (cart instanceof EntityMinecartContainer) {
      EntityMinecartContainer container=(EntityMinecartContainer)cart;
      for (int i=0; i < container.getSizeInventory(); i++) {
        ItemStack s=container.getStackInSlot(i);
        if (s != null) {
          container.setInventorySlotContents(i,null);
          if (container.getStackInSlot(i) == null) {
            activator.sendItem(s,direction.getOpposite());
          }
        }
      }
    }
    cart.setDead();
    activator.sendItem(cart.getCartItem(),direction.getOpposite());
    return true;
  }
  return false;
}