It depends of the complexity of the software. The small Unix utilities like grep or ls are, AFAIK, bug free, because what they do is very simple, but something more complicated is more likely to have small bugs somewhere.
There was a bug in ls, long ago; it stuck around long enough that it became a feature. It was supposed to not list "." or "..", but instead it skipped all files starting with "."; which thus became the standard way to hide a file on *nix.