He has what he describes as a "low sugar blood content." Barney is smug and self-confident, until true leadership is sought, whereupon he dances about in a fluster.
In the second season episode, Andy on Trial, a millionaire wants revenge on Andy for giving him a traffic ticket.
After the prosecuting attorney forces Barney to admit everything he said was true in front of Andy.
He sheepishly admits to playing up to the sexy reporter (one of the rare times he admits to getting full up of himself), but vowing that Andy is an outstanding lawman, whose caring methodology is far more effective than "going by the book." In the third season episode Lawman Barney, two farmers illegally selling produce on the road do not take a warning from Barney seriously and run him off the road, taunting him.
As Barney confronts the farmers, he finds his inner strength and as they get closer towards him, he tells them that despite them both being bigger than he is, his badge "represents a lot of people that are a lot bigger than either one of you." Defeated, the farmers pack up and leave.
One major comedic source is Barney's lack of ability with a firearm.
When Andy makes a more serious warning to the farmers later, they reveal that they had run off a deputy earlier.