Program: 12678
Project: 12678
Buggy source:
@Override public EnumActionResult onItemUse(ItemStack stack,EntityPlayer player,World world,BlockPos pos,EnumHand hand,EnumFacing side,float hitX,float hitY,float hitZ){
  if (side != EnumFacing.UP) {
    return EnumActionResult.FAIL;
  }
  if (world.isRemote)   return EnumActionResult.SUCCESS;
  IBlockState iblockstate=world.getBlockState(pos);
  Block block=iblockstate.getBlock();
  boolean replaceable=block.isReplaceable(world,pos);
  if (!replaceable) {
    pos=pos.up();
  }
  int direction=MathHelper.floor_double((player.rotationYaw * 4F) / 360F + 0.5D) & 3;
  EnumFacing facing=EnumFacing.getHorizontal(direction);
  BlockPos other=pos.offset(facing);
  boolean other_replaceable=block.isReplaceable(world,other);
  boolean flag1=world.isAirBlock(pos) || replaceable;
  boolean flag2=world.isAirBlock(other) || other_replaceable;
  if (player.canPlayerEdit(pos,side,stack) && player.canPlayerEdit(other,side,stack)) {
    VampirismMod.log.t("String_Node_Str",flag1,flag2,UtilLib.doesBlockHaveSolidTopSurface(world,pos.down()),UtilLib.doesBlockHaveSolidTopSurface(world,other.down()));
    if (flag1 && flag2 && UtilLib.doesBlockHaveSolidTopSurface(world,pos.down())&& UtilLib.doesBlockHaveSolidTopSurface(world,other.down())) {
      IBlockState state1=ModBlocks.medChair.getDefaultState().withProperty(BlockMedChair.PART,BlockMedChair.EnumPart.BOTTOM).withProperty(BlockMedChair.FACING,facing.getOpposite());
      if (world.setBlockState(pos,state1,3)) {
        IBlockState state2=state1.withProperty(BlockMedChair.PART,BlockMedChair.EnumPart.TOP).withProperty(BlockMedChair.FACING,facing.getOpposite());
        world.setBlockState(other,state2,3);
      }
      --stack.stackSize;
      return EnumActionResult.SUCCESS;
    }
  }
  return EnumActionResult.FAIL;
}

Fixed version (ground truth):
@Override public EnumActionResult onItemUse(ItemStack stack,EntityPlayer player,World world,BlockPos targetPos,EnumHand hand,EnumFacing side,float hitX,float hitY,float hitZ){
  if (side != EnumFacing.UP) {
    return EnumActionResult.FAIL;
  }
  if (world.isRemote)   return EnumActionResult.SUCCESS;
  IBlockState iblockstate=world.getBlockState(targetPos);
  Block block=iblockstate.getBlock();
  boolean replaceable=block.isReplaceable(world,targetPos);
  BlockPos pos=replaceable ? targetPos : targetPos.up();
  int direction=MathHelper.floor_double((player.rotationYaw * 4F) / 360F + 0.5D) & 3;
  EnumFacing facing=EnumFacing.getHorizontal(direction);
  BlockPos other=pos.offset(facing);
  boolean other_replaceable=block.isReplaceable(world,other);
  boolean flag1=world.isAirBlock(pos) || replaceable;
  boolean flag2=world.isAirBlock(other) || other_replaceable;
  if (player.canPlayerEdit(pos,side,stack) && player.canPlayerEdit(other,side,stack)) {
    VampirismMod.log.t("String_Node_Str",flag1,flag2,UtilLib.doesBlockHaveSolidTopSurface(world,pos.down()),UtilLib.doesBlockHaveSolidTopSurface(world,other.down()));
    if (flag1 && flag2 && UtilLib.doesBlockHaveSolidTopSurface(world,pos.down())&& UtilLib.doesBlockHaveSolidTopSurface(world,other.down())) {
      IBlockState state1=ModBlocks.medChair.getDefaultState().withProperty(BlockMedChair.PART,BlockMedChair.EnumPart.BOTTOM).withProperty(BlockMedChair.FACING,facing.getOpposite());
      if (world.setBlockState(pos,state1,3)) {
        IBlockState state2=state1.withProperty(BlockMedChair.PART,BlockMedChair.EnumPart.TOP).withProperty(BlockMedChair.FACING,facing.getOpposite());
        world.setBlockState(other,state2,3);
      }
      --stack.stackSize;
      return EnumActionResult.SUCCESS;
    }
  }
  return EnumActionResult.FAIL;
}