A federal judge in Detroit sentenced former engineer James Liang to 40 months in prison on Friday.