As a person that is involved with police officers on a regular basis, follow these simple rules.
1. Do NOT EVER, EVER, EVER touch a police officer in any manner, form, on purpose, accidentally, or for any reason EVER. Touching is extended to sticks, cars, or any other inanimate object. Once you touch a police officer, GAME OVER, you will be arrested.
2. Do not SAY, threaten, or begin an act that could be misconstrued as beginning to touch a police officer. See #1.
3. If an officer detains you for any reason, don't move. If it is for a ticket, being arrested or for any other reason UNTIL THE POLICE OFFICER SAYS IT'S OK TO GO. It doesn't matter if the original incident that the police officer uses is legal or not, once an officer detains you, please don't run.*
*Technically you have more rights than you think, but being drunk at 3 am outside of the bar is usually not the best time to discuss Civil Rights and an officers ability to detain someone for questioning without placing them under arrest with the police officer in question.
Now I am the biggest civil rights advocate around. But there is a time and place to fight police abuse and the streets are not the time.
Remember, you do not have to say anything to the police officer. You do not have to consent to a search. You do not have to answer questions. My best advice is to give them your ID, stand there AND NOT SAY ANYTHING.
If you feel that a police officer has violated the law, treated you unfairly or violated your civil rights, take notes of the incident, contact the officers superiors, file a formal complaint with internal affairs, contact your lawyer or the ACLU.
The time and place to prove a police officer wrong is not on the streets.