Choose an item you want to duplicate throw it then save and quit the game then go back to the game. Pick up the item then pause and exit out of the game with out saving(click on the x Button on the top left) open up minecraft again and it should be in your inventory and the same should be floating on the floor.
If you need to get a trash can quick,Go to a desert and break a cactus.then go home.Dig 3 blocks down.Then put sand down.Break the block on each side on the second block down and put that cactus peice down. Then put a trap door down over the hole. Then open the trash cans lid up and see the item you had disappear.More Minecraft Cheat Codes @ CheatListings