Hydrocele repair is surgery to correct the swelling of the scrotum that occurs when you have a hydrocele. A hydrocele is a collection of fluid around a testicle. Baby boys sometimes have a hydrocele at birth. Hydroceles also occur in older boys and men.