Program: 163083
Project: 163083
Buggy source:
/** 
 * Highlights the function name of the declared @type, @typep, or @opaque as an   {@link ElixirSyntaxHighlighter.TYPE}and the its parameters as   {@link ElixirSyntaxHighlighter.TYPE_PARAMETER}.
 */
private void highlightType(@NotNull final AtUnqualifiedNoParenthesesCall atUnqualifiedNoParenthesesCall,@NotNull final AnnotationHolder annotationHolder){
  PsiElement noParenthesesOneArgument=atUnqualifiedNoParenthesesCall.getNoParenthesesOneArgument();
  PsiElement[] grandChildren=noParenthesesOneArgument.getChildren();
  if (grandChildren.length == 1) {
    PsiElement grandChild=grandChildren[0];
    if (grandChild instanceof Match) {
    }
 else     if (grandChild instanceof Type) {
      Infix infix=(Infix)grandChild;
      PsiElement leftOperand=infix.leftOperand();
      Set<String> typeParameterNameSet=Collections.emptySet();
      if (leftOperand instanceof Call) {
        Call call=(Call)leftOperand;
        PsiElement functionNameElement=call.functionNameElement();
        if (functionNameElement != null) {
          highlight(functionNameElement.getTextRange(),annotationHolder,ElixirSyntaxHighlighter.TYPE);
        }
        if (call instanceof ElixirMatchedUnqualifiedNoArgumentsCall) {
        }
 else         if (call instanceof ElixirMatchedUnqualifiedParenthesesCall) {
          PsiElement[] primaryArguments=call.primaryArguments();
          PsiElement[] secondaryArguments=call.secondaryArguments();
          if (secondaryArguments != null) {
            typeParameterNameSet=typeTypeParameterNameSet(secondaryArguments);
            highlightTypesAndTypeParameterUsages(primaryArguments,Collections.<String>emptySet(),annotationHolder,ElixirSyntaxHighlighter.TYPE);
            highlightTypesAndTypeTypeParameterDeclarations(secondaryArguments,typeParameterNameSet,annotationHolder,ElixirSyntaxHighlighter.TYPE);
          }
 else           if (primaryArguments != null) {
            typeParameterNameSet=typeTypeParameterNameSet(primaryArguments);
            highlightTypesAndTypeTypeParameterDeclarations(primaryArguments,typeParameterNameSet,annotationHolder,ElixirSyntaxHighlighter.TYPE);
          }
        }
 else {
          cannotHighlightTypes(call);
        }
      }
 else {
        cannotHighlightTypes(leftOperand);
      }
      PsiElement rightOperand=infix.rightOperand();
      if (rightOperand != null) {
        highlightTypesAndTypeParameterUsages(rightOperand,typeParameterNameSet,annotationHolder,ElixirSyntaxHighlighter.TYPE);
      }
    }
 else     if (grandChild instanceof ElixirMatchedUnqualifiedParenthesesCall) {
      ElixirMatchedUnqualifiedParenthesesCall matchedUnqualifiedParenthesesCall=(ElixirMatchedUnqualifiedParenthesesCall)grandChild;
      if (matchedUnqualifiedParenthesesCall.functionName().equals(UNQUOTE)) {
        PsiElement[] secondaryArguments=matchedUnqualifiedParenthesesCall.secondaryArguments();
        if (secondaryArguments != null) {
          Set<String> typeParameterNameSet=typeTypeParameterNameSet(secondaryArguments);
          highlightTypesAndTypeTypeParameterDeclarations(secondaryArguments,typeParameterNameSet,annotationHolder,ElixirSyntaxHighlighter.TYPE);
        }
      }
 else {
        cannotHighlightTypes(matchedUnqualifiedParenthesesCall);
      }
    }
 else {
      cannotHighlightTypes(grandChild);
    }
  }
}

Fixed version (ground truth):
/** 
 * Highlights the function name of the declared @type, @typep, or @opaque as an   {@link ElixirSyntaxHighlighter.TYPE}and the its parameters as   {@link ElixirSyntaxHighlighter.TYPE_PARAMETER}.
 */
private void highlightType(@NotNull final AtUnqualifiedNoParenthesesCall atUnqualifiedNoParenthesesCall,@NotNull final AnnotationHolder annotationHolder){
  PsiElement noParenthesesOneArgument=atUnqualifiedNoParenthesesCall.getNoParenthesesOneArgument();
  PsiElement[] grandChildren=noParenthesesOneArgument.getChildren();
  if (grandChildren.length == 1) {
    PsiElement grandChild=grandChildren[0];
    if (grandChild instanceof Match) {
    }
 else     if (grandChild instanceof Type) {
      Infix infix=(Infix)grandChild;
      PsiElement leftOperand=infix.leftOperand();
      Set<String> typeParameterNameSet=Collections.emptySet();
      if (leftOperand instanceof Call) {
        Call call=(Call)leftOperand;
        PsiElement functionNameElement=call.functionNameElement();
        if (functionNameElement != null) {
          highlight(functionNameElement.getTextRange(),annotationHolder,ElixirSyntaxHighlighter.TYPE);
        }
        if (call instanceof ElixirMatchedUnqualifiedNoArgumentsCall) {
        }
 else         if (call instanceof ElixirMatchedUnqualifiedParenthesesCall) {
          PsiElement[] primaryArguments=call.primaryArguments();
          PsiElement[] secondaryArguments=call.secondaryArguments();
          if (secondaryArguments != null) {
            typeParameterNameSet=typeTypeParameterNameSet(secondaryArguments);
            highlightTypesAndTypeParameterUsages(primaryArguments,Collections.<String>emptySet(),annotationHolder,ElixirSyntaxHighlighter.TYPE);
            highlightTypesAndTypeTypeParameterDeclarations(secondaryArguments,typeParameterNameSet,annotationHolder,ElixirSyntaxHighlighter.TYPE);
          }
 else           if (primaryArguments != null) {
            typeParameterNameSet=typeTypeParameterNameSet(primaryArguments);
            highlightTypesAndTypeTypeParameterDeclarations(primaryArguments,typeParameterNameSet,annotationHolder,ElixirSyntaxHighlighter.TYPE);
          }
        }
 else {
          cannotHighlightTypes(call);
        }
      }
 else {
        cannotHighlightTypes(leftOperand);
      }
      PsiElement rightOperand=infix.rightOperand();
      if (rightOperand != null) {
        highlightTypesAndTypeParameterUsages(rightOperand,typeParameterNameSet,annotationHolder,ElixirSyntaxHighlighter.TYPE);
      }
    }
 else     if (grandChild instanceof ElixirMatchedUnqualifiedParenthesesCall) {
      ElixirMatchedUnqualifiedParenthesesCall matchedUnqualifiedParenthesesCall=(ElixirMatchedUnqualifiedParenthesesCall)grandChild;
      if (matchedUnqualifiedParenthesesCall.functionName().equals(UNQUOTE)) {
        PsiElement[] secondaryArguments=matchedUnqualifiedParenthesesCall.secondaryArguments();
        if (secondaryArguments != null) {
          Set<String> typeParameterNameSet=typeTypeParameterNameSet(secondaryArguments);
          highlightTypesAndTypeTypeParameterDeclarations(secondaryArguments,typeParameterNameSet,annotationHolder,ElixirSyntaxHighlighter.TYPE);
        }
      }
 else {
        cannotHighlightTypes(matchedUnqualifiedParenthesesCall);
      }
    }
 else     if (grandChild instanceof UnqualifiedNoArgumentsCall) {
      Call grandChildCall=(Call)grandChild;
      PsiElement functionNameElement=grandChildCall.functionNameElement();
      if (functionNameElement != null) {
        highlight(functionNameElement.getTextRange(),annotationHolder,ElixirSyntaxHighlighter.TYPE);
      }
    }
 else {
      cannotHighlightTypes(grandChild);
    }
  }
}