The study actually seems fairly reasonable. They did collect data on unemployment, previous arrest history, illicit drug involvement, etc. I'm not a statistician (I've never even taken a statistics class), but I believe they account for these factors. Presumably they compare control individuals with no arrest history, no drugs, etc. with shot individuals in those same categories. (Is that what "adjusting for confounding factors" means?)
There are some likely causes of error. For instance, "We assumed that the resident population of Philadelphia risked being shot in an assault at any location and at any time of day or night. ... As such, we reasonably chose not to exclude participants as immune from hypothetically becoming cases because they were, for instance, asleep at home during the night or at work in an office building during the day." The authors also state "We also did not account for the potential of reverse causation between gun possession and gun assault. Although our long list of confounders may have served to reduce some of the problems posed by reverse causation."
I get the sense that Dr. Branas probably does not support the ownership of guns. However, he does not seem to totally dismiss the defensive use of guns. If we give the study the benefit of the doubt, it can be interpreted to show simply that "a gun is not a magic wand to make the BG stop." Individuals producing a gun without a willingness to use it are putting themselves in a very dangerous situation, yes. I think many of us have heard of the Texas airplane mechanic who was shot with his own gun in a confrontation with a burglar outside his home, or some similar story. These things happen. We should recognize the danger inherent in unskilled and untrained self defense (relative to trained and skilled SD), and should prepare ourselves to ensure they do not happen to us. Go take a CCW class.
There are some flaws, yes. I'd personally love to see others found by more knowledgeable people than myself.