A federal judge sentenced a Brownsville attorney to 3 1/2 years in prison for his role in the Abel Limas cash for court favors scandal.