The study, published in the January issue of the journal Animal Cognition, found that detection-dog teams erroneously "alerted," or identified a scent, when there was no scent present more than 200 times, particularly when the handler believed that there was scent present.
In other words, at best, dogs are responding to the subtle non-verbal cues of their masters to find drugs or explosives where the human thinks there should be drugs or explosives. The cop suspects you have pot so his body language makes the dog alert. At worst, the cop is purposefully cuing his dog to alert when he wants a handy excuse to violate your 4th Amendment rights.
Link to Original Source