Program: 163072
Project: 163072
Buggy source:
private void visitNonModuleAttributeCall(@NotNull final Call call){
  if (org.elixir_lang.structure_view.element.CallDefinitionClause.is(call)) {
    visitCallDefinitionClause(call);
  }
 else {
    PsiReference reference=call.getReference();
    if (reference != null) {
      Collection<PsiElement> resolvedCollection=null;
      if (reference instanceof PsiPolyVariantReference) {
        PsiPolyVariantReference polyVariantReference=(PsiPolyVariantReference)reference;
        ResolveResult[] resolveResults;
        try {
          resolveResults=polyVariantReference.multiResolve(false);
        }
 catch (        StackOverflowError stackOverflowError) {
          Logger.error(Callable.class,"String_Node_Str",call);
          resolveResults=new ResolveResult[0];
        }
        List<ResolveResult> validResolveResults=ContainerUtil.filter(resolveResults,new Condition<ResolveResult>(){
          @Override public boolean value(          ResolveResult resolveResult){
            return resolveResult.isValidResult();
          }
        }
);
        resolvedCollection=ContainerUtil.map(validResolveResults,new com.intellij.util.Function<ResolveResult,PsiElement>(){
          @Override public PsiElement fun(          ResolveResult resolveResult){
            return resolveResult.getElement();
          }
        }
);
      }
 else {
        PsiElement resolved=reference.resolve();
        if (resolved != null) {
          resolvedCollection=Collections.singleton(resolved);
        }
      }
      if (resolvedCollection != null) {
        for (        PsiElement resolved : resolvedCollection) {
          highlight(call,reference.getRangeInElement(),resolved,holder);
        }
      }
    }
 else     if (isBitStreamSegmentOption(call)) {
      String name=call.getName();
      if (name != null && BIT_STRING_TYPES.contains(name)) {
        highlight(call,holder,ElixirSyntaxHighlighter.TYPE);
      }
    }
  }
}

Fixed version (ground truth):
private void visitNonModuleAttributeCall(@NotNull final Call call){
  if (org.elixir_lang.structure_view.element.CallDefinitionClause.is(call)) {
    visitCallDefinitionClause(call);
  }
 else {
    PsiReference reference=call.getReference();
    if (reference != null) {
      Collection<PsiElement> resolvedCollection=null;
      if (reference instanceof PsiPolyVariantReference) {
        PsiPolyVariantReference polyVariantReference=(PsiPolyVariantReference)reference;
        ResolveResult[] resolveResults;
        try {
          resolveResults=polyVariantReference.multiResolve(false);
        }
 catch (        StackOverflowError stackOverflowError) {
          Logger.error(Callable.class,"String_Node_Str",call);
          resolveResults=new ResolveResult[0];
        }
        List<ResolveResult> validResolveResults=ContainerUtil.filter(resolveResults,new Condition<ResolveResult>(){
          @Override public boolean value(          ResolveResult resolveResult){
            return resolveResult.isValidResult();
          }
        }
);
        resolvedCollection=ContainerUtil.map(validResolveResults,new com.intellij.util.Function<ResolveResult,PsiElement>(){
          @Override public PsiElement fun(          ResolveResult resolveResult){
            return resolveResult.getElement();
          }
        }
);
      }
 else {
        PsiElement resolved=reference.resolve();
        if (resolved != null) {
          resolvedCollection=Collections.singleton(resolved);
        }
      }
      if (resolvedCollection != null && resolvedCollection.size() > 0) {
        for (        PsiElement resolved : resolvedCollection) {
          highlight(call,reference.getRangeInElement(),resolved,holder);
        }
      }
 else       if (call.hasDoBlockOrKeyword()) {
        PsiElement functionNameElement=call.functionNameElement();
        if (functionNameElement != null) {
          highlight(functionNameElement.getTextRange(),holder,ElixirSyntaxHighlighter.MACRO_CALL);
        }
      }
    }
 else     if (isBitStreamSegmentOption(call)) {
      String name=call.getName();
      if (name != null && BIT_STRING_TYPES.contains(name)) {
        highlight(call,holder,ElixirSyntaxHighlighter.TYPE);
      }
    }
  }
}