Sorry mate, these are stems heavily attacked by rot. No one could do anything. Probably leaves will show symptoms of potassium/nitrogen deficiency. Plant will react anticipating the maturation.
The yield is compromised, less bud's quality.
Probably all these spots have been caused by heavy roots suffering and/or eenvironment imbalance.