You look at this in a bubble.
What if that senior was just rejected by another girl. He is just being a jerk in places where he can be a jerk. In others words he is just getting out his frustration in an aggressive form.
By the way, I started out my comment wrong. Instead of excluding I should added to what you said. Like in improv with an "and" exercise.
If so, especially if it is someone I know in person.
I would want to treat him to a beer (or anything else culturally appropriate if one does not drink alcohol), to hear out the frustration. And if it's not enough, play some board games.
To let him/her know, there are other healthier ways to let out that frustration, with friends. And not be a jerk at the same time.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.