<commit_before>package org.jetbrains.plugins.scala
package project
package template

import java.{util => ju}

import com.intellij.facet.impl.ui.libraries.{LibraryCompositionSettings, LibraryOptionsPanel}
import com.intellij.framework.library.FrameworkLibraryVersionFilter
import com.intellij.ide.util.projectWizard.{JavaModuleBuilder, ModuleWizardStep, SettingsStep}
import com.intellij.openapi.module.{JavaModuleType, Module}
import com.intellij.openapi.roots.ModifiableRootModel
import com.intellij.openapi.roots.ui.configuration.projectRoot.{LibrariesContainer, LibrariesContainerFactory}
import com.intellij.openapi.util.Disposer
import javax.swing.{JComponent, JLabel}
import org.jetbrains.plugins.scala.extensions._

/**
 * @author <NAME>
 */
class ScalaModuleBuilder extends JavaModuleBuilder {
  private var librariesContainer: LibrariesContainer = _

  private var libraryCompositionSettings: LibraryCompositionSettings = _

  addModuleConfigurationUpdater((_: Module, rootModel: ModifiableRootModel) => {
    libraryCompositionSettings.addLibraries(rootModel, ju.Collections.emptyList(), librariesContainer)
  })

  override def modifySettingsStep(settingsStep: SettingsStep): ModuleWizardStep = {
    librariesContainer = LibrariesContainerFactory.createContainer(settingsStep.getContext.getProject)

    new ScalaStep(settingsStep)
  }

  private class ScalaStep(settingsStep: SettingsStep) extends ModuleWizardStep() {
    private val javaStep = JavaModuleType.getModuleType.modifyProjectTypeStep(settingsStep, ScalaModuleBuilder.this)

    private val libraryPanel = new LibraryOptionsPanel(
      ScalaLibraryType.Description,
      "",<commit_msg>mutable list expected as a parameter of `addLibraries` method #SCL-15329 fixed<commit_after>package org.jetbrains.plugins.scala
package project
package template

import java.{util => ju}

import com.intellij.facet.impl.ui.libraries.{LibraryCompositionSettings, LibraryOptionsPanel}
import com.intellij.framework.library.FrameworkLibraryVersionFilter
import com.intellij.ide.util.projectWizard.{JavaModuleBuilder, ModuleWizardStep, SettingsStep}
import com.intellij.openapi.module.{JavaModuleType, Module}
import com.intellij.openapi.roots.ModifiableRootModel
import com.intellij.openapi.roots.libraries.Library
import com.intellij.openapi.roots.ui.configuration.projectRoot.{LibrariesContainer, LibrariesContainerFactory}
import com.intellij.openapi.util.Disposer
import javax.swing.{JComponent, JLabel}
import org.jetbrains.plugins.scala.extensions._

/**
 * @author <NAME>
 */
class ScalaModuleBuilder extends JavaModuleBuilder {
  private var librariesContainer: LibrariesContainer = _

  private var libraryCompositionSettings: LibraryCompositionSettings = _

  addModuleConfigurationUpdater((_: Module, rootModel: ModifiableRootModel) => {
    val mutableEmptyList = new ju.ArrayList[Library]()
    libraryCompositionSettings.addLibraries(rootModel, mutableEmptyList, librariesContainer)
  })

  override def modifySettingsStep(settingsStep: SettingsStep): ModuleWizardStep = {
    librariesContainer = LibrariesContainerFactory.createContainer(settingsStep.getContext.getProject)

    new ScalaStep(settingsStep)
  }

  private class ScalaStep(settingsStep: SettingsStep) extends ModuleWizardStep() {
    private val javaStep = JavaModuleType.getModuleType.modifyProjectTypeStep(settingsStep, ScalaModuleBuilder.this)

    private val libraryPanel = new LibraryOptionsPanel(
      ScalaLibraryType.Description,
      "",
{'fraction_non_alphanumeric': 0.08166189111747851, 'fraction_numerical': 0.0014326647564469914, 'mean_word_length': 6.706401766004415, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7594517', 'n_tokens_mistral': 967, 'n_tokens_neox': 945, 'n_words': 176}