There isn't a document that explains each of the subfolders, etc in the JIRA Source Code but that would be beneficial. You can help get that created by going to https://jira.atlassian.com/secure/Dashboard.jspa and creating a feature request to have the developers publish and article such as the one you're seeking.
In regards to debugging JIRA, there are two articles that may help you:
Creating a Remote Debug Target
Hello everyone! It's been a while since Houston's had a Atlassian Community Event (formerly Atlassian User Group meeting) so I wanted to gauge interest in an unofficial downtown meetup after wo...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events