code: public static void populateModuleSpecWithCoreDependencies(ModuleSpec.Builder moduleSpecBuilder, ScriptArchive scriptArchive) throws ModuleLoadException {
          Objects.requireNonNull(moduleSpecBuilder, "moduleSpecBuilder");
          Objects.requireNonNull(scriptArchive, "scriptArchive");
  
          Set<String> compilerPlugins = scriptArchive.getModuleSpec().getCompilerPluginIds();
          for (String compilerPluginId : compilerPlugins) {
              moduleSpecBuilder.addDependency(DependencySpec.createModuleDependencySpec(getPluginModuleId(compilerPluginId), false));
          }
          moduleSpecBuilder.addDependency(JRE_DEPENDENCY_SPEC);
          // TODO: Why does a module need a dependency on Nicobar itself?
          moduleSpecBuilder.addDependency(NICOBAR_CORE_DEPENDENCY_SPEC);
          moduleSpecBuilder.addDependency(DependencySpec.createLocalDependencySpec());
      }
docs: Populates a module spec builder with core dependencies on JRE, Nicobar, itself, and compiler plugins.
  
  @param moduleSpecBuilder builder to populate
  @param scriptArchive {@link ScriptArchive} to copy from