There is a reason why the rule of law is so precious in any country, even China. Sometime yesterday, 6 men were convicted and sentenced to death for their parts in the riots in Xinjiang in July. Of course, there are many people (particularly in the Muslim community in China) that are convinced it is a sham.
If the Chinese (and particularly the Chinese Uyghurs) had a real belief in the fairness of the justice system, it is likely that these riots never would have happened. But, because no one does, it is likely that the riots will resurface again, particularly after a quite likely flawed trial condemns more Uyghurs to death. If the people believed it was a fair trial, then they would be more likely to accept the outcome. Because they do not, more violence could result.
This is the problem with the Chinese approach on so many fronts. They have been trying to build up soft power in many parts of the world (especially with the Confucian centers that have been opened around the world), they still ignore many of the actual roots of soft power, even with their own citizens. This is not a way to build legitimacy; it merely erodes it further. (The same happens when they lash out against the Dalai Lama for going to give religious care to Taiwanese.)
Without fixing these problems of legitimacy, the Chinese will never end the general violence and distrust in Xinjiang.