I hibernated my laptop when Android Studio was running and found later that the laptop had been shut down. Now one of my source files is appearing empty in Android Studio an
Simple steps that always helped me to solve this problem
Delete caches folder of the path
C:\Users\user\.AndroidStudio3.6\system\caches.
Deleting above folder only sometimes will not work so, need to delete specific project's caches folder too
F:\AndroidStudioProjects\sampleApplication\.idea\caches
First: always use source control. Git and similar DVCS's don't require a server and can create a repository for you locally.
As for recovering your file, whether it's practical will be a matter of whether the disk blocks pointed to by the filesystem are correct; the fact that you're seeing \0
suggests that you're using an SSD and that the filesystem records have the right size but wrong block(s), meaning that recovery is unlikely. You should open the file with a hex editor and see whether any content past the initial few bytes is readable. If not, the file itself is almost certainly unrecoverable.
However, IntelliJ includes a local-history feature that may have an older copy of the file.
Simplest Soultion !
Note: If you want your java files, than you can find them in the folder 'com' of the parent folder of the decompiled(downloaded) folder.