Program: 12637
Project: 12637
Buggy source:
@Override public EnumActionResult onItemUse(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;
  ItemStack stack=player.getHeldItem(hand);
  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((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)) {
    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);
      }
      ItemStackUtil.decr(stack);
      return EnumActionResult.SUCCESS;
    }
  }
  return EnumActionResult.FAIL;
}

Fixed version (ground truth):
@Override public EnumActionResult onItemUse(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;
  ItemStack stack=player.getHeldItem(hand);
  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((player.rotationYaw * 4F) / 360F + 0.5D) & 3;
  EnumFacing facing=EnumFacing.getHorizontal(direction);
  BlockPos otherPos=pos.offset(facing);
  Block otherBlock=world.getBlockState(otherPos).getBlock();
  boolean other_replaceable=otherBlock.isReplaceable(world,otherPos);
  boolean flag1=world.isAirBlock(pos) || replaceable;
  boolean flag2=world.isAirBlock(otherPos) || other_replaceable;
  VampirismMod.log.d(regName,"String_Node_Str",block,targetPos,replaceable,world.getBlockState(pos).getBlock(),pos,world.isAirBlock(pos));
  VampirismMod.log.d(regName,"String_Node_Str",facing,otherBlock,otherPos,other_replaceable,world.isAirBlock(otherPos));
  if (player.canPlayerEdit(pos,side,stack) && player.canPlayerEdit(otherPos,side,stack)) {
    VampirismMod.log.d(regName,"String_Node_Str",flag1,flag2,UtilLib.doesBlockHaveSolidTopSurface(world,pos.down()),UtilLib.doesBlockHaveSolidTopSurface(world,otherPos.down()));
    if (flag1 && flag2 && UtilLib.doesBlockHaveSolidTopSurface(world,pos.down())&& UtilLib.doesBlockHaveSolidTopSurface(world,otherPos.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(otherPos,state2,3);
      }
      ItemStackUtil.decr(stack);
      return EnumActionResult.SUCCESS;
    }
 else {
      VampirismMod.log.d(regName,"String_Node_Str",world.getBlockState(pos.down()).getBlock(),world.getBlockState(otherPos.down()).getBlock());
    }
  }
 else {
    VampirismMod.log.d(regName,"String_Node_Str",player.canPlayerEdit(pos,side,stack),player.canPlayerEdit(otherPos,side,stack));
  }
  return EnumActionResult.FAIL;
}