Visible crew/equipment: During a shot of two of the bar patrons, a man runs past them in the background. The man is director Ben Affleck. He didn't realize it was himself until after he chose to include the shot in the film. (00:16:40)
Continuity mistake: In the scene outside the hospital, after Nick Poole has been shot, Remy Bressant picks up the bottle of liquor, which was capped by Patrick Kenzie and drinks straight from the bottle. The bottle has mysteriously uncapped itself.
Continuity mistake: The scene with the two young detectives driving the crack mother of the missing child starts out with no rear view mirror on the windshield and no one wearing their seat belts. Then the driver has his seat belt on for one shot then it is gone again. The rear view mirror appears back on the window at the end of the movie.
Continuity mistake: At the beginning of the film when Patrick and Angie go to see Helene McCready (the mother of the missing child), When Bea takes the couple out of the room to talk to them, her arms are folded differently from shot to shot.
Plot hole: When Detective Broussard is killed and Patrick was being interviewed by police (dressed in a white shirt), the interviewing police detective say "a couple of nights ago you were at the quarry." In fact it was months before when they were trying negotiate the release of Amanda at the quarry. It unravels the entire movie.
Other mistake: Near the end of the film, when Jack Doyle is being arrested, the Mass. State Police troopers' badges and shoulder patches are not what is actually worn by this police department, although the remainder of the uniform appears to be accurate.
Answer: It is not actually shown who shoots at and hits Nick, so it is necessary to make a deduction based on what is known. The shooter was behind the front door and shot at Patrick when Patrick was trying to aid Nick. Patrick retreated to the side of the house and returned fire. When Patrick entered the house, "Bubba" was seen lying facedown on the floor with a gunshot to his shoulder, apparently dead from Patrick's blind shots. No one else was in the front room, so it seems safe to conclude that Bubba killed Nick and shot at Patrick. "Fat Lady" Roberta emerged from a back room and Corwin Earle was in the upstairs hallway, so - even though they were in the house at the time - neither was likely to have been the shooter behind the front door.
That's not Bubba laying on the floor, that's the old man who resides at the house - Leon Trett. Bubba was Patrick's good-guy kingpin buddy, played by the rapper Slaine.