If it is a logical error and not physical, check out R-Studio from http://www.r-tt.com/
It saved my butt one time - we'd just spent a while merging code for a big project, hadn't checked the code in and Window$ crashed, took out the MBR so Windows could not see it, nor could Linux-based rescue CDs.
I tried Stellar Phoenix (it's CRAP and does NOT work as advertised. They advertise full NTFS 5.1 feature set support but we bought it only to find it does NOT work with NTFS compression. They refused to refund our money so we had to resort to disputing it with AmEx. Enjoy the chargeback, Stellar!), which failed miserably. Tried several others, none worked.
We came across the R-Tools web site. By that time I was skeptical, but we tried the R-Studio demo, and it recovered 99% of our code (all files <64KB) and the rest I recovered using some of the other features in the demo and stiching them together. We went ahead and bought it anyhow even though the demo helped us recover ALL files from the project because it saved our behinds!