When you input a worn down tool (tested with Iron Shovel, Iron Sword, & Enchanted Diamond Sword) into the anvil GUI along with required raw materials to repair the durability, an additional non-existent copy of the raw material is shown remaining in the inventory until the material is attempted to be moved, in which case it will disappear.
What I expected to happen was...:
There should be no more material displayed
What actually happened was...:
It remained displayed
Steps to Reproduce:
1. Input a tool with reduced durability which can be repaired into the anvil
2. Right click (take half stack of selected item) a stack with a quantity of two of the material used to repair said item, and place it onto the anvil
3. Shift click (auto-place the selected item) the remaining material stack, inserting it into the anvil along with the previous material (whether necessary or not; ie: a single diamond will repair a sword to original max durability, a second diamond can be inserted via shift-click and consumed)
4. A remaining material will be present in the inventory until an attempt is made to move the item, at which time it will disappear.