The connection to the wall AC outlet is not likely to cause the battery to swell. If the AC adapter has a two prong plug, it does not matter which way around it is plugged in.
If the AC adapter has 3 prongs (one ground) it will be inserted to the power connectors the correct way.
Swelling (if it occurs) is normally from continued charging to a very high charge level and left connected. I do not see swelling very often. A swollen battery can leak because of the swelling.
Leaving a computer connected to AC should be limited to around 75 to 80% charge.
It also simply could be the battery age (no guarantee as to specifically how long any battery will last).
I suggest you replace the battery as soon as you can (leaking as I noted earlier), and then not leave it plugged into AC all the time.