Pride and Glory

Assistant Chief Francis Tierney Sr. is the head of a multigenerational New York City Police Department (NYPD) family, which includes his sons Francis "Franny" Jr., Ray, and his son-in-law Jimmy Egan. Deputy Inspector Franny is the Commanding Officer of the 31st Precinct, where Sergeant Jimmy is a patrol officer, while Detective Ray works in the Missing Persons Squad, having transferred to this lighter duty after being shot during an arrest two years earlier.
Jimmy leads the NYPD to victory in city-league football. While everybody is celebrating, Franny receives a call that four men from his precinct have been shot dead when answering a "shots fired" 911 call at the Washington Heights apartment of a local drug gang leader, Angel Tezo. Francis Sr. bullies Ray into joining a task force put together to investigate the killings.
Jimmy and fellow patrol officers Kenny Dugan, Reuben "Sandy" Santiago and Eddie Carbone find the abandoned cab Tezo fled in, containing the dead cab driver. The four officers are part of a corrupt group in Franny's precinct, along with the four dead officers. Under Jimmy's direction, they burn the cab and dead driver, and set about finding Tezo before Ray and the task force do.
Ray tells Franny that his investigation has revealed that a policeman named Sandy had tipped off Tezo to the raid. When Franny later confronts Santiago, he admits to what he did and expresses surprise that Franny never knew what was going on with the officers in his precinct. The cops had intended to kill Tezo so they could work with another dealer, Casado, but Santiago warned Tezo due to a childhood friendship, believing Tezo would simply flee. Though Franny tells Santiago to hand over his badge, he does not take the information to his superiors for fear of losing his command.
Steady police work helps Ray find Tezo, but he arrives to find Jimmy and his crew torturing Tezo to death. Jimmy suddenly uses Ray's gun to kill Tezo, then tells Ray to accept being the hero who killed the cop-killer. Jimmy's crew leave just before Ray's backup arrives.
Santiago, while telling a reporter about the corruption (but gives no names) in the 31st Precinct, suddenly commits suicide. After the newspaper reports the corruption, Internal Affairs (IAB) investigates the Tezo killing. Ray says he was not the shooter and refuses to say more, while Jimmy admits his crew was there then fabricates a story that Ray killed Tezo in cold blood. Francis Sr. is furious with his son for not lying to IAB, to which Ray reveals that he did enough lying for his father regarding the shooting that hurt him two years earlier, at which his fellow officers threw the shooter off a building for revenge. Franny arrives and tells his father that the lies and corruption end now, and they will arrest their brother-in-law even if it costs Franny his career.
Things quickly unravel within the 31st Precinct sector. Franny and Ray look for Jimmy, while Dugan and Carbone hold up a liquor store, with Carbone and a customer soon dead and Dugan holding the owner hostage. While Tezo's cousin agitates the crowd outside the liquor store, Franny goes in and arrests Dugan. Ray confronts Jimmy at a nearby bar, where Ray wins a brutal brawl between them. Ray is walking a handcuffed Jimmy back to the liquor store when the still-agitated crowd surrounds them. Tezo's cousin has the crowd hold Ray while Jimmy offers himself to be beaten to death. Ray staggers away from his dead brother-in-law, making it back to Franny at the liquor store. A few days later, the three Tierney men arrive at the New York County Courthouse to give their statements.

Question: who investigates the Tezo killing?
Answer: Internal Affairs