<commit_before>package com.intellij.psi.scope.processor;

import com.intellij.psi.*;
import com.intellij.psi.infos.CandidateInfo;
import com.intellij.psi.scope.ElementClassHint;
import com.intellij.psi.scope.PsiConflictResolver;
import com.intellij.psi.scope.conflictResolvers.JavaMethodsConflictResolver;
import com.intellij.util.ReflectionCache;
import com.intellij.util.SmartList;

public class MethodResolverProcessor extends MethodCandidatesProcessor implements ElementClassHint {
  private boolean myStopAcceptingCandidates = false;

  public MethodResolverProcessor(PsiMethodCallExpression place){
    super(place, new PsiConflictResolver[]{new JavaMethodsConflictResolver(place.getArgumentList())}, new SmartList<CandidateInfo>());
    setArgumentList(place.getArgumentList());
    obtainTypeArguments(place);
  }

  public MethodResolverProcessor(PsiClass classConstr, PsiExpressionList argumentList, PsiElement place) {
    super(place, new PsiConflictResolver[]{new JavaMethodsConflictResolver(argumentList)}, new SmartList<CandidateInfo>());
    setIsConstructor(true);
    setAccessClass(classConstr);
    setArgumentList(argumentList);
  }

  public boolean shouldProcess(Class elementClass) {
    return ReflectionCache.isAssignable(PsiMethod.class, elementClass);
  }


  public void handleEvent(Event event, Object associated) {
    if (event == Event.CHANGE_LEVEL) {
      if (myHasAccessibleStaticCorrectCandidate) myStopAcceptingCandidates = true;
    }
    super.handleEvent(event, associated);
  }

  public boolean execute(PsiElement element, PsiSubstitutor substitutor) {
    return !myStopAcceptingCandidates && super.execute(element, substitutor);
  }

  public JavaResolveResult[] getResult() {
    JavaResolveResult[] result = super.getResult();
    if (result.length > 1) {
      int i = 0;
    }
    return result;
  }
}<commit_msg>reverted<commit_after>package com.intellij.psi.scope.processor;

import com.intellij.psi.*;
import com.intellij.psi.infos.CandidateInfo;
import com.intellij.psi.scope.ElementClassHint;
import com.intellij.psi.scope.PsiConflictResolver;
import com.intellij.psi.scope.conflictResolvers.JavaMethodsConflictResolver;
import com.intellij.util.ReflectionCache;
import com.intellij.util.SmartList;

public class MethodResolverProcessor extends MethodCandidatesProcessor implements ElementClassHint {
  private boolean myStopAcceptingCandidates = false;

  public MethodResolverProcessor(PsiMethodCallExpression place){
    super(place, new PsiConflictResolver[]{new JavaMethodsConflictResolver(place.getArgumentList())}, new SmartList<CandidateInfo>());
    setArgumentList(place.getArgumentList());
    obtainTypeArguments(place);
  }

  public MethodResolverProcessor(PsiClass classConstr, PsiExpressionList argumentList, PsiElement place) {
    super(place, new PsiConflictResolver[]{new JavaMethodsConflictResolver(argumentList)}, new SmartList<CandidateInfo>());
    setIsConstructor(true);
    setAccessClass(classConstr);
    setArgumentList(argumentList);
  }

  public boolean shouldProcess(Class elementClass) {
    return ReflectionCache.isAssignable(PsiMethod.class, elementClass);
  }


  public void handleEvent(Event event, Object associated) {
    if (event == Event.CHANGE_LEVEL) {
      if (myHasAccessibleStaticCorrectCandidate) myStopAcceptingCandidates = true;
    }
    super.handleEvent(event, associated);
  }

  public boolean execute(PsiElement element, PsiSubstitutor substitutor) {
    return !myStopAcceptingCandidates && super.execute(element, substitutor);
  }
}
{'fraction_non_alphanumeric': 0.09131905298759865, 'fraction_numerical': 0.0005636978579481398, 'mean_word_length': 6.140845070422535, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, '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': '6961669', 'n_tokens_mistral': 1020, 'n_tokens_neox': 979, 'n_words': 186}