I have never been puled over on a bicycle, but last fall, in Central Oakland, riding down Forbes going from the left lane to the right, a cop in the right lane yelled, "you can't ride in the middle lane!" out his window while driving in the right lane.
While pedaling with my right hand signalling that I was trying to get over I said, "I'm trying to get to the right lane, but you aren't letting me."
He quickly realized what was going on, quietly said, "oh." and sped up as I got behind him.
At the light at S Craig, he was still right in front of me. I got off my bike and walked the sidewalk to go to Kiva Han as I said told the cop to have a good day. He responded with a "you too" followed by a seemingly sincere "sorry about that back there".
As I wrote that, I just remembered that I got pulled over twice during the G-20 for not having blinking lights. Once on Forbes in Central Oakland and once on Centre by S. Millvale.
Both times I had multiple front and back lights and was hassled and lecture for a few minutes before they let me go. They told me they had been having problems with "kids on bikes" not having lights, which they claimed to be illegal.
I still don't fully understand what they were doing.