<commit_before>package com.intellij.packageDependencies.actions;

import com.intellij.analysis.AnalysisScope;
import com.intellij.analysis.AnalysisScopeBundle;
import com.intellij.analysis.BaseAnalysisAction;
import com.intellij.analysis.BaseAnalysisActionDialog;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class AnalyzeDependenciesAction extends BaseAnalysisAction {
  private JCheckBox myTransitiveCB;
  private JPanel myWholePanel;
  private JSpinner myBorderChooser;

  public AnalyzeDependenciesAction() {
    super(AnalysisScopeBundle.message("action.forward.dependency.analysis"), AnalysisScopeBundle.message("action.analysis.noun"));
    myBorderChooser.setModel(new SpinnerNumberModel(5, 0, Integer.MAX_VALUE, 1));
    myTransitiveCB.addActionListener(new ActionListener() {
      public void actionPerformed(final ActionEvent e) {
        myBorderChooser.setEnabled(myTransitiveCB.isSelected());
      }
    });
    myBorderChooser.setEnabled(myTransitiveCB.isSelected());
  }

  protected void analyze(@NotNull final Project project, AnalysisScope scope) {
    new AnalyzeDependenciesHandler(project, scope, myTransitiveCB.isSelected() ? ((SpinnerNumberModel)myBorderChooser.getModel()).getNumber().intValue() : 0).analyze();
  }

  @Nullable
  protected JComponent getAdditionalActionSettings(final Project project, final BaseAnalysisActionDialog dialog) {
    myTransitiveCB.setText("Show transitive dependencies. Do not travel deeper than");
    return myWholePanel;
  }
}
<commit_msg>UI initialization -> AWT thread (IDEADEV-33140)<commit_after>package com.intellij.packageDependencies.actions;

import com.intellij.analysis.AnalysisScope;
import com.intellij.analysis.AnalysisScopeBundle;
import com.intellij.analysis.BaseAnalysisAction;
import com.intellij.analysis.BaseAnalysisActionDialog;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class AnalyzeDependenciesAction extends BaseAnalysisAction {
  private JCheckBox myTransitiveCB;
  private JPanel myWholePanel;
  private JSpinner myBorderChooser;

  public AnalyzeDependenciesAction() {
    super(AnalysisScopeBundle.message("action.forward.dependency.analysis"), AnalysisScopeBundle.message("action.analysis.noun"));

  }

  protected void analyze(@NotNull final Project project, AnalysisScope scope) {
    new AnalyzeDependenciesHandler(project, scope, myTransitiveCB.isSelected() ? ((SpinnerNumberModel)myBorderChooser.getModel()).getNumber().intValue() : 0).analyze();
  }

  @Nullable
  protected JComponent getAdditionalActionSettings(final Project project, final BaseAnalysisActionDialog dialog) {
    myTransitiveCB.setText("Show transitive dependencies. Do not travel deeper than");
    myTransitiveCB.addActionListener(new ActionListener() {
      public void actionPerformed(final ActionEvent e) {
        myBorderChooser.setEnabled(myTransitiveCB.isSelected());
      }
    });
    myBorderChooser.setModel(new SpinnerNumberModel(5, 0, Integer.MAX_VALUE, 1));
    myBorderChooser.setEnabled(myTransitiveCB.isSelected());
    return myWholePanel;
  }
}

{'fraction_non_alphanumeric': 0.09399707174231332, 'fraction_numerical': 0.003806734992679356, 'mean_word_length': 6.191578947368421, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '4744421', 'n_tokens_mistral': 976, 'n_tokens_neox': 922, 'n_words': 178}