Program: 156482
Project: 156482
Buggy source:
@SubscribeEvent public void tick(TickEvent.WorldTickEvent event){
  if (event.phase == TickEvent.Phase.END && requests.containsKey(event.world)) {
    HashSet<PipeExtensionRequest> rSet=requests.get(event.world);
    World w=event.world;
    for (    PipeExtensionRequest r : rSet) {
      Position target=new Position(r.x,r.y,r.z);
      target.orientation=r.o;
      boolean retract=r.stack.getItem() == BuildCraftTransport.pipeItemsVoid;
      ArrayList<ItemStack> removedPipeStacks=null;
      if (retract) {
        target.moveBackwards(1.0D);
      }
 else {
        target.moveForwards(1.0D);
        if (!w.isAirBlock((int)target.x,(int)target.y,(int)target.z)) {
          r.h.sendItem(r.stack,r.o.getOpposite());
          continue;
        }
      }
      Block oldBlock=w.getBlock(r.x,r.y,r.z);
      int oldMeta=w.getBlockMetadata(r.x,r.y,r.z);
      NBTTagCompound nbt=new NBTTagCompound();
      w.getTileEntity(r.x,r.y,r.z).writeToNBT(nbt);
      w.setBlockToAir(r.x,r.y,r.z);
      boolean failedPlacement=false;
      if (retract) {
        removedPipeStacks=w.getBlock((int)target.x,(int)target.y,(int)target.z).getDrops(w,(int)target.x,(int)target.y,(int)target.z,w.getBlockMetadata((int)target.x,(int)target.y,(int)target.z),0);
        w.setBlockToAir((int)target.x,(int)target.y,(int)target.z);
      }
 else {
        if (!r.stack.getItem().onItemUse(r.stack,CoreProxy.proxy.getBuildCraftPlayer((WorldServer)w,r.x,r.y,r.z).get(),w,r.x,r.y,r.z,1,0,0,0)) {
          failedPlacement=true;
          target.moveBackwards(1.0D);
        }
      }
      nbt.setInteger("String_Node_Str",(int)target.x);
      nbt.setInteger("String_Node_Str",(int)target.y);
      nbt.setInteger("String_Node_Str",(int)target.z);
      TileGenericPipe pipeTile=(TileGenericPipe)TileEntity.createAndLoadEntity(nbt);
      w.setBlock((int)target.x,(int)target.y,(int)target.z,oldBlock,oldMeta,3);
      w.setTileEntity((int)target.x,(int)target.y,(int)target.z,pipeTile);
      pipeTile.setWorldObj(w);
      pipeTile.validate();
      pipeTile.updateEntity();
      PipeTransportItems items=(PipeTransportItems)pipeTile.pipe.transport;
      if (!retract && !failedPlacement) {
        r.stack.stackSize--;
      }
      if (r.stack.stackSize > 0) {
        sendItem(items,r.stack,r.o.getOpposite());
      }
      if (removedPipeStacks != null) {
        for (        ItemStack s : removedPipeStacks) {
          sendItem(items,s,r.o.getOpposite());
        }
      }
      if (!retract && !failedPlacement) {
        TileGenericPipe newPipeTile=(TileGenericPipe)w.getTileEntity(r.x,r.y,r.z);
        newPipeTile.updateEntity();
        pipeTile.scheduleNeighborChange();
        if (pipeTile.getPipe() != null) {
          ((Pipe)pipeTile.getPipe()).scheduleWireUpdate();
        }
      }
    }
    rSet.clear();
  }
}

Fixed version (ground truth):
@SubscribeEvent public void tick(TickEvent.WorldTickEvent event){
  if (event.phase == TickEvent.Phase.END && requests.containsKey(event.world)) {
    HashSet<PipeExtensionRequest> rSet=requests.get(event.world);
    World w=event.world;
    for (    PipeExtensionRequest r : rSet) {
      Position target=new Position(r.x,r.y,r.z);
      target.orientation=r.o;
      boolean retract=r.stack.getItem() == BuildCraftTransport.pipeItemsVoid;
      ArrayList<ItemStack> removedPipeStacks=null;
      if (retract) {
        target.moveBackwards(1.0D);
        if (w.getBlock((int)target.x,(int)target.y,(int)target.z) != BuildCraftTransport.genericPipeBlock) {
          r.h.sendItem(r.stack,r.o.getOpposite());
          continue;
        }
        target.moveBackwards(1.0D);
        if (w.getBlock((int)target.x,(int)target.y,(int)target.z) != BuildCraftTransport.genericPipeBlock) {
          r.h.sendItem(r.stack,r.o.getOpposite());
          continue;
        }
        target.moveForwards(1.0D);
      }
 else {
        target.moveForwards(1.0D);
        if (!w.isAirBlock((int)target.x,(int)target.y,(int)target.z)) {
          r.h.sendItem(r.stack,r.o.getOpposite());
          continue;
        }
      }
      Block oldBlock=w.getBlock(r.x,r.y,r.z);
      int oldMeta=w.getBlockMetadata(r.x,r.y,r.z);
      NBTTagCompound nbt=new NBTTagCompound();
      w.getTileEntity(r.x,r.y,r.z).writeToNBT(nbt);
      w.setBlockToAir(r.x,r.y,r.z);
      boolean failedPlacement=false;
      if (retract) {
        removedPipeStacks=w.getBlock((int)target.x,(int)target.y,(int)target.z).getDrops(w,(int)target.x,(int)target.y,(int)target.z,w.getBlockMetadata((int)target.x,(int)target.y,(int)target.z),0);
        w.setBlockToAir((int)target.x,(int)target.y,(int)target.z);
      }
 else {
        if (!r.stack.getItem().onItemUse(r.stack,CoreProxy.proxy.getBuildCraftPlayer((WorldServer)w,r.x,r.y,r.z).get(),w,r.x,r.y,r.z,1,0,0,0)) {
          failedPlacement=true;
          target.moveBackwards(1.0D);
        }
      }
      nbt.setInteger("String_Node_Str",(int)target.x);
      nbt.setInteger("String_Node_Str",(int)target.y);
      nbt.setInteger("String_Node_Str",(int)target.z);
      TileGenericPipe pipeTile=(TileGenericPipe)TileEntity.createAndLoadEntity(nbt);
      w.setBlock((int)target.x,(int)target.y,(int)target.z,oldBlock,oldMeta,3);
      w.setTileEntity((int)target.x,(int)target.y,(int)target.z,pipeTile);
      pipeTile.setWorldObj(w);
      pipeTile.validate();
      pipeTile.updateEntity();
      PipeTransportItems items=(PipeTransportItems)pipeTile.pipe.transport;
      if (!retract && !failedPlacement) {
        r.stack.stackSize--;
      }
      if (r.stack.stackSize > 0) {
        sendItem(items,r.stack,r.o.getOpposite());
      }
      if (removedPipeStacks != null) {
        for (        ItemStack s : removedPipeStacks) {
          sendItem(items,s,r.o.getOpposite());
        }
      }
      if (!retract && !failedPlacement) {
        TileGenericPipe newPipeTile=(TileGenericPipe)w.getTileEntity(r.x,r.y,r.z);
        newPipeTile.updateEntity();
        pipeTile.scheduleNeighborChange();
        if (pipeTile.getPipe() != null) {
          ((Pipe)pipeTile.getPipe()).scheduleWireUpdate();
        }
      }
    }
    rSet.clear();
  }
}