Did my file get corrupted or something?

So I found a library for my new LCD screen, and I went in to the example and then modified it a bit and did a save as. Then I modified that some more and did save as again. I now have the original example program, and two of my own programs. Now, neither of my two programs will load! I get the following messages:

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0
	at processing.app.Sketch.setCurrentCode(Sketch.java:1177)
	at processing.app.Sketch.load(Sketch.java:215)
	at processing.app.Sketch.<init>(Sketch.java:137)
	at processing.app.Editor.handleOpenInternal(Editor.java:2193)
	at processing.app.Editor.<init>(Editor.java:304)
	at processing.app.Base.handleOpen(Base.java:709)
	at processing.app.Base.handleOpen(Base.java:674)
	at processing.app.Base$7.actionPerformed(Base.java:1108)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266)
	at java.awt.Component.processMouseEvent(Component.java:6263)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at java.awt.Component.processEvent(Component.java:6028)
	at java.awt.Container.processEvent(Container.java:2041)
	at java.awt.Component.dispatchEventImpl(Component.java:4630)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
	at java.awt.Container.dispatchEventImpl(Container.java:2085)
	at java.awt.Window.dispatchEventImpl(Window.java:2475)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Is there any way I can get these files back? I put a lot of work into one of them and would like to not have to redo it all!

Zowie! That shouldn't happen.

If you've tried the obvious shut-down-and-restart-everything then there might be file corruption. Try to open the .ino file in another editor like Notepad or whatever you use for other coding work.

If that gets the file data, then try copy-pasting into a fresh .ino file and see if that can be saved and re-opened by the Arduino IDE. There may be one bad character in the middle that's causing the problem, so you might end up copy-pasting chunks until you identify the chunk with a problem. Re-write that by hand.

Woah! Yeah, I looked directly in my sketchbook folder, and there was all kinds of weird stuff that happened with the save as concerning incorrect folder placement and misnaming files/folders. I manually fixed it all and now it works fine. Thanks! :)

Never seen that before - what version of the Arduino software and what OS?

Windows 7, Arduino 1.0.6... I'm due for an update... But a lot of it was my own fault too