You put your change in a vending machine, you expect to get your candy, prize, or whatever you paid for. This trope is when the machine doesn't do that, or inflicts harm on you. This comes in several varieties: the machine gets jammed, and the buyer might get the candy, the hard way, the machine ruins you drink, if you get it, you tamper with the machine, and you pay for it (ie it hurts and embarrasses you), it doesn't take your money, it shows how much of a dummy you are, or it just hates you.
Coffee machines and replicators do count, and machines gaining sentience and attacking people is the Exaggerated Trope. My Car Hates Me is a sister trope. People usually apply Percussive Maintenance when they encounter an uncooperative vending machine. Your Television Hates You and Mocking Music are related.
Azumanga Daioh features Tomo trying to get a coffee drink from a vending machine, only for it to pour the drink but fail to dispense the cup. She's suitably outraged when the next person to step up gets two cups.
Nichijou has Sasahara get similar treatment when his vending machine dispenses the drink then the cup. Being a Cloud Cuckoo Lander, Sasahara merely admires the vending machine's gall.
On a related note, there's also the scene in the beginning where a cameoing Stephen King gets called an asshole by an ATM.
In another Stephen King movie "The Tommyknockers" (possibly in the novel it is based on as well), some guy tries to retrieve a soda can from a vending machine, which is possessed or powered by the Alien technology / greenish glow. His hand gets stuck in there and the whole thing blows up, killing him.
At the beginning of The X-Files: Fight the Future, Mulder goes to buy something to drink. He puts money in the machine, pushes a button, then next one, then all of them. He whacks the machine and then jiggles it angrily. He notices that the machine is not plugged... because there is a bomb. The bomb the FBI is looking for in another building.
There's a Ciaphas Cain fanfic where the commissariat's recaf machine is given the nickname "Little Horus" (think "Little Judas"). Eventually the protagonist shoots it, and the replacement works a lot better.
In Death: Eve Dallas hates vending machines, and the feeling seems to be mutual. They tend to malfunction whenever she attempts to use one. It's so bad that she habitually has someone else put her money in for her and press the button whenever she wants to buy something from one.
Nexus magazine #2, short story "Firepoint Five". The main computer of a starship has a tendency to malfunction. One example of its problems is was preparing Lieutenant Simms' breakfast. It scrambled his fried eggs, and his sausage came out burned - and was supposed to be bacon. His toast was buttered (he hated buttered toast) and the coffee nozzle missed his cup - but didn't miss his lap.
In Red Dwarf season 8 episode "Only The Good", Rimmer cheats a vending machine out of its money by attaching it to a string and yanking it out after receiving what he ordered from it. Later in the episode, the machine blasts a can at Rimmer in anger, knocking him over.
Another Red Dwarf example: in a Season 10 episode, a vending machine becomes romantically obsessed with Lister.
In The Hitchhiker's Guide to the Galaxy, Arthur Dent, sick of getting bad tea from the Nutri-Matic machine, gives it a lengthy lecture on the nature and history of good tea. The machine hijacks the starship's entire computing power to work on the problem, leaving the ship defenceless against a missile attack. Arthur gets his tea in the end, though.
Early in Deus Ex, you overhear Gunther Hermann grumbling to Anna Navarre. The vending machines gives him the wrong soda so often he believes there is a conspiracy against him. In the sequel Deus Ex: Invisible War, it turns out he was right, the maintenance man was screwing with him.
There are grog machines featured in four out of the five Monkey Island games. Two of them act like this.
In The Secret Of Monkey Island, you can put as many pieces of eight as you want in it, but it won't work. A single bottle of root beer later falls out of it when LeChuck punches Guybrush into the machine.
In Escape from Monkey Island, the machine still doesn't dispense any grog, but if you kick it enough, some empty cans eventually tumble out.
When you reach New Haven in Borderlands, you can find Dr. Zed's Claptrap assistant running around all over the place. He stops at the medical vending machine and pounds on it, frustrated that it isn't working. The vending machine works just fine for the player.
Early in Half Life Opposing Force, Shepard encounters a fat security guard with his hand stuck in a vending machine. The guard curses, going like "Stupid machines!".
In the Clip Show episode "So It's Come To This", Homer, who just woke up from a coma, walks to a vending machine. It crashed into Homer, putting him back into a coma.
In "Marge on the Lam", Homer puts his arm inside a vending machine to get a free "invisible cola" (actually a Crystal Buzz Cola). When he reaches into it Carl warns him, telling him that someone lost an arm doing that once. (We see the inside of the machine where there's a skeleton arm from the last guy who tried to get a free soda, still holding onto a can of Fresca.) Homer eventually grabs the soda, but his arm gets stuck and Lenny and Carl run off screaming. Then, Homer gets his other arm stuck inside a candy vending machine. (In a scene cut from syndication, he imagines himself at Maggie's wedding with his arms still stuck to the vending machines.) Just as the rescue workers are about cut off Homer's arms, it turns out this could've been avoided if he let go of the can in the first machine, and he had a note written up for Marge.
In the animated special of Garfield: His 9 Lives, Garfield attempts to use a vending machine aboard his spaceship to order lunch, in the form of a cup of coffee and some pie, during his ninth and final life. The machine drops the pie, pours coffee on it, and then crushes it with the coffee mug.
Veggietales: Larry has gotten his candy stuck. In a vending machine.
"My Three Suns": a machine selling "Refreshing Crack" gets stuck, and the customer whines "Don't hold out on me, Man!"
"Mother's Day": All the machines rebel against humanity, including a vending machine that shoots cans at people.
"The Bots and The Bees": Bev, the new beverage vending machine at the office, hates Bender and insults him at every occasion. Soon the two start fighting, which then leads to lovemaking, which leads to Bev having a baby.
In the episode "Ghost in the Machines", one of Bender's methods in his attempt to kill Fry involved possessing a vending machine that serves pineapples and has them launch at Fry when he tries to make a purchase.
In the episode "Rock Bottom" in Sponge Bob Square Pants, Spongebob is waiting for the bus so he can go home. He gets hungry and runs across the street to the vending machine to buy a candy bar. The machine itself works properly, but the bus showed up and drove off everytime he tried to put a dollar into the machine or to reach for the candy bar after it was dispensed. Keeping his eyes on the bus, he slowly moves to grab the candy bar, with the bus revving the engines everytime he gently touches the bar. He tries to run back across the street to catch the bus, but it drives off. A random stranger walks up to machine and just takes the candy bar.
Star Trek: The Animated Series episode "The Practical Joker".. After the Enterprise passes through a mysterious energy field the ship's computer starts playing practical jokes on the crew. When Mr. Scott tries to obtain a sandwich from the food synthesiser it sprays food all over him, including a custard pie in the face.
In Seven Little Monsters, Four tries his hardest to get a sheriff's badge from a prize machine, only for it to keep giving him princess crowns.
There's a Darwin Award (or urban legend) about a guy who tried to get a free drink by cramming his arm into the machine's slot. His efforts brought the machine crashing down on him.
Vending machines that dispensed soda/pop in cups, rather than cans or bottles, used to be fairly common. They were notorious for malfunctioning, for example by giving you only ice or having an AWOL cup.
Five hats means that five tropers think it is ready to publish.
You are saying that you think this draft is ready to be published. That means the description is not ambiguous,
it doesn't duplicate an existing trope, there are at least three examples, and the title makes sense.
Is that what you meant to do?
You are saying this draft has a ready-to-publish hat it does not deserve and you are taking it back.