Forensic ballistics is highly over rated and in my opinion should not be allowed as evidence in court since declaring a match comes down to the opinion of the technician, just like in lie detector evidence. There is no such thing as a "perfect match". While no two guns will mark their bullets identically, neither will any one gun mark two bullets identically. There are many random and unrepeatable factors such as dust, grit and powder and bullet residue in the bore, all of which will mark a bullet. The bullet itself will have marks from manufacture, handling and loading into a case even before it is fired. High quality barrels are made as nearly identical as can be so the differences are minute. When examining in such minute detail, those random markings are very prominent. For every mark which matches there will be a dozen which don't match.
So it always comes down to an opinion and that is never an unbiased opinion. The fact that the technician is given a gun to test tells him it is expected to match. One case which comes to mind was when Claude Dallas shot two game wardens in Idaho. The state "expert" declared a Ruger .357 magnum revolver as a positive match to the lethal bullet. What the state's expert didn't know was that revolver didn't belong to Dallas but to the principal witness against Dallas. The state's "expert" then reexamined the bullet and said it "probably" did not match. There have been many cases where the prosecution's expert declared a match and the defence hired an expert who disputed the match. There would no doubt be more such instances were it not for the fact that most defendants cannot afford to hire their own expert.
I have a real problem with TV shows like "CSI" because jurors will believe that crap is factual and "scientific evidence" is beyond dispute. It is useful in guiding an investigation in the right direction but in and of itself should not be considered as "proof" of anything.