How do I find out which module loads which javascript file?
"If you look at the source of the page you can see the path for each script. This will identify where the script is."

Example

Typically the script located at...

sites/all/modules/contrib/panels/js/panels.js


...would more often than not only be used by the module of the same name

sites/all/modules/contrib/panels/panels.module


...or possible an include file

sites/all/modules/contrib/panels/includes/SOME_FILE.inc


Obviously bare in mind that Drupal uses the jQuery library so references to errors might fallback to these files just because its been implemented wrong by the developer in the module. Its more than likely never going to be something wrong with the libraries.

/misc/jquery.js
/misc/jquery.once.js