Steps to duplicate items in creative mode.
1.Put any item stack in your inventory.
2.Open your inventory.
3.Hover mouse over item stack, and press the 'drop' key (usually 'q').
4.Pick the item back up, and you will have gained one item.
For best results, use a stack that is less than full.
This bug works with any item, including non-stackable items like pickaxes.
Sometimes you will need to save & quit then rejoin to see the duplicated item.
This seems to affect a lot of versions, I tested all the way back to 1.6.4, including all the snapshots along the way.