<commit_before>package com.intellij.codeInsight.daemon.impl.actions;

import com.intellij.codeInsight.daemon.HighlightDisplayKey;
import com.intellij.codeInspection.SuppressManager;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.impl.source.jsp.jspJava.JspMethodCall;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.util.IncorrectOperationException;
import org.jetbrains.annotations.Nullable;

/**
 * @author yole
 */
public class AddNoInspectionJavaCommentFix extends AddNoInspectionCommentFix {
  public AddNoInspectionJavaCommentFix(HighlightDisplayKey key) {
    super(key, PsiStatement.class);
  }

  @Nullable
  protected PsiElement getContainer(PsiElement context) {
    if (context == null || PsiTreeUtil.getParentOfType(context, JspMethodCall.class) != null) return null;
    return PsiTreeUtil.getParentOfType(context, PsiStatement.class);
  }

  @Override
  protected void createSuppression(final Project project,
                                   final Editor editor,
                                   final PsiElement element,
                                   final PsiElement container) throws IncorrectOperationException {
    boolean added = false;
    if (container instanceof PsiDeclarationStatement && SuppressManager.getInstance().canHave15Suppressions(element)) {
      final PsiDeclarationStatement declarationStatement = (PsiDeclarationStatement)container;
      final PsiElement[] declaredElements = declarationStatement.getDeclaredElements();
      for (PsiElement declaredElement : declaredElements) {
        if (declaredElement instanceof PsiLocalVariable) {
          final PsiModifierList modifierList = ((PsiLocalVariable)declaredElement).getModifierList();
          if (modifierList != null) {<commit_msg>suppress for statement from IRV fixed (IDEADEV-33628)<commit_after>package com.intellij.codeInsight.daemon.impl.actions;

import com.intellij.codeInsight.daemon.HighlightDisplayKey;
import com.intellij.codeInspection.SuppressManager;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.impl.source.jsp.jspJava.JspMethodCall;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.util.IncorrectOperationException;
import org.jetbrains.annotations.Nullable;

/**
 * @author yole
 */
public class AddNoInspectionJavaCommentFix extends AddNoInspectionCommentFix {
  public AddNoInspectionJavaCommentFix(HighlightDisplayKey key) {
    super(key, PsiStatement.class);
  }

  @Nullable
  protected PsiElement getContainer(PsiElement context) {
    if (context == null || PsiTreeUtil.getParentOfType(context, JspMethodCall.class) != null) return null;
    return PsiTreeUtil.getParentOfType(context, PsiStatement.class, false);
  }

  @Override
  protected void createSuppression(final Project project,
                                   final Editor editor,
                                   final PsiElement element,
                                   final PsiElement container) throws IncorrectOperationException {
    boolean added = false;
    if (container instanceof PsiDeclarationStatement && SuppressManager.getInstance().canHave15Suppressions(element)) {
      final PsiDeclarationStatement declarationStatement = (PsiDeclarationStatement)container;
      final PsiElement[] declaredElements = declarationStatement.getDeclaredElements();
      for (PsiElement declaredElement : declaredElements) {
        if (declaredElement instanceof PsiLocalVariable) {
          final PsiModifierList modifierList = ((PsiLocalVariable)declaredElement).getModifierList();
          if (modifierList != null) {
{'fraction_non_alphanumeric': 0.08014961261020571, 'fraction_numerical': 0.0024044883783061713, 'mean_word_length': 4.135802469135802, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '835688', 'n_tokens_mistral': 1007, 'n_tokens_neox': 990, 'n_words': 199}