In case of broken garage door spring, the part must be replaced with a new one. There is not a way in which the two or more separate pieces can be attached to each other again and work effectively as before. In the case of extension springs, if one of the two is broken and the other one is intact, both are replaced for achieving a satisfactory level of safety and efficiency.
In order to repair broken spring, the parts of the old unit have to be removed and the new one has to be installed. The replacement spring must match the old one in terms of length, diameter, wire size and lift power. The job must be done by a professional technician. DIY replacement is unadvisable as it poses a serious safety risk. All springs are under great tension and if they are not handled properly, they may cause serious injury.