A judge ruled that the May attack was motivated by homophobia.