A Thames Water contractor who had been working on Swindon's new bus boulevard has been sentenced after disorder broke out near the court house.