From 《THE SHAWSHANK REDEMPTION》:
Brooks ain't no bug.He's just institutionalized.
what exactly does "ain't no bug" mean?
Here "ain't no" is a colloquial way of saying "is no", kind of slang.
I guess "Brooks ain't no bug" could mean "Brooks is not a problem," but I would have to understand better the context to be sure.
The form "ain't" is used in spoken English for all the verb be forms:
"I ain't no teacher" = "I am not a teacher"
"You ain't studying hard" = "You are not studying hard"
However, this is just for colloquial English, as I said, kind of slang.
To help someone else answer what "ain't no bug" means here, the context is the following:
Andy Dufresne: I just don't understand what happened in there. Heywood: Old man's crazy as a rat in a tin shithouse, is what. Red: Oh Heywood, that's enough out of you! Ernie: I heard he had you shittin' in your pants! Heywood: Fuck you! Red: Would you knock it off? Brooks ain't no bug. He's just... just institutionalized. Heywood: Institutionalized, my ass. Red: The man's been in here fifty years, Heywood. Fifty years! This is all he knows. In here, he's an important man. He's an educated man. Outside, he's nothin'! Just a used up con with arthritis in both hands.
Brooks was the old convict, acting as librarian and allowed freedom in the prison as a trusted inmate, who is suddenly released after 50 years and commits suicide because he cannot cope with outside life.
I suspect this comment is meant to indicate that he did not give the other inmates away to the prison guards, but kept quiet about what he know.
A "bug" is a way of spying. If a room is "bugged", there are secret microphones in it.
In the Watergate Scandal in the USA Nixon's people were busy trying to "bug" the democratic party's headquarters. Happily, they got caught.