There are postings that talk about swapping engines in this forum. I believe for a 2011 to 2005 you would need to take the whole wire harness and ECU from the 2011.
A forum community dedicated to Chevy Cobalt owners and enthusiasts. Come join the discussion about performance, modifications, parts, classifieds, troubleshooting, maintenance, and more!