there are 2 different things. there are those pop-ups about the cities wanting to join the other side PJyang mentioned, those are a bug, just ignore them.
city flipping due to culture is different.
this thread explains all the math behind it. that article was written for vanilla, and i don't think the mechanics behind it have changed for warlords or BtS (except for the "masters own the tiles in BFCs" rule for vassal situations). but like Verge, i don't know whether the civ being your vassal changes the situation at all; that article wouldn't say so since vassals didn't exist then. if it's a city you captured and later gave back to them, i'm kinda but not really sure you cannot flip it away from them now. if it's a city they gave to you in a peace treaty, i think maybe they cannot flip it away from you, but i don't even know why i think that so it's probably wrong.
ignoring vassals completely, talking about a normal situation going by that article: a city can't flip to you until you have more culture in it than anybody else does. note that means you don't always need to have more than 50% (like if the city's under pressure from 2 different civs, it might be 10% third guy, 48% you, 42% him, that's eligible for a flip to you. if it's 39% yours but all the rest is the other guy's culture, it won't even have any chance to revolt to you until you get over 50%. and then once you get 50%, it does a random roll each turn to see if it revolts, depending on the chance (explained in the article). the first revolt, it won't flip to you, that's just a warning to the owner. if a second random roll that goes through, you would get the option to keep the city (and you get to keep the cultural buildings too, since it's not a military capture, very nice) or raze it and just keep the land that you now own). if you choose to raze it, you do not get any negative diplo penalty for razing a city.
that article explains what makes cities more likely to flip, so that you can understand the math and learn how to better protect your own from flipping (stack troops in there is the quickest and easiest) and encourage other cities to flip to your side if circumstances line up right (if your state religions are different, spread your SR to that city is quickest, the chance that it flips to you gets doubled).
If AI has enough troops stationed to keep the order, even a city with 100% of your population may not have a chance to revolt.
yup. the AP can sort of get around that in some cases, by using the "Assign city XYZ to its rightful owner" resolution. the city has to belong to a voting member and the "rightful owner" is the person with the highest culture in it (again, not necessarily 50%) and has to be a full member; works out best if that's you and you happen to be AP Resident
. i've used spies to make the current owner a voting member by changing them to free religion in two cases to get cities that way. sometimes the current owner does defy it a couple times before they give in. when using the AP vote, you don't get the choice to raze the city, you have to keep it if the vote passes.