Program: 130380
Project: 130380
Buggy source:
@RequiredReadAction @Override public void process(@NotNull CSharpResolveOptions options,@NotNull DotNetGenericExtractor defaultExtractor,@Nullable PsiElement forceQualifierElement,@NotNull final Processor<ResolveResult> processor){
  PsiElement element=options.getElement();
  String qName=StringUtil.strip(element.getText(),CharFilter.NOT_WHITESPACE_FILTER);
  DotNetNamespaceAsElement namespace=null;
  PsiElement qualifier=options.getQualifier();
  PsiElement parent=element.getParent();
  if (!options.isCompletion()) {
    if (parent instanceof CSharpUsingNamespaceStatement) {
      DotNetNamespaceAsElement namespaceAsElement=((CSharpUsingNamespaceStatement)parent).resolve();
      if (namespaceAsElement != null) {
        processor.process(new CSharpResolveResult(namespaceAsElement));
      }
    }
 else {
      namespace=DotNetPsiSearcher.getInstance(element.getProject()).findNamespace(qName,element.getResolveScope());
      if (namespace != null) {
        processor.process(new CSharpResolveResult(namespace));
      }
    }
  }
 else {
    processDefaultCompletion(processor,element,qualifier);
    if (parent instanceof CSharpUsingNamespaceStatement) {
      PsiElement parentOfStatement=parent.getParent();
      if (parentOfStatement instanceof CSharpNamespaceDeclaration) {
        DotNetReferenceExpression namespaceReference=((CSharpNamespaceDeclaration)parentOfStatement).getNamespaceReference();
        if (namespaceReference != null) {
          PsiElement resolvedElement=namespaceReference.resolve();
          if (resolvedElement instanceof DotNetNamespaceAsElement) {
            processNamespaceChildren(processor,element,(DotNetNamespaceAsElement)resolvedElement);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
@RequiredReadAction @Override public void process(@NotNull CSharpResolveOptions options,@NotNull DotNetGenericExtractor defaultExtractor,@Nullable PsiElement forceQualifierElement,@NotNull final Processor<ResolveResult> processor){
  PsiElement element=options.getElement();
  String qName=StringUtil.strip(element.getText(),CSharpReferenceExpression.DEFAULT_REF_FILTER);
  DotNetNamespaceAsElement namespace=null;
  PsiElement qualifier=options.getQualifier();
  PsiElement parent=element.getParent();
  if (!options.isCompletion()) {
    if (parent instanceof CSharpUsingNamespaceStatement) {
      DotNetNamespaceAsElement namespaceAsElement=((CSharpUsingNamespaceStatement)parent).resolve();
      if (namespaceAsElement != null) {
        processor.process(new CSharpResolveResult(namespaceAsElement));
      }
    }
 else {
      namespace=DotNetPsiSearcher.getInstance(element.getProject()).findNamespace(qName,element.getResolveScope());
      if (namespace != null) {
        processor.process(new CSharpResolveResult(namespace));
      }
    }
  }
 else {
    processDefaultCompletion(processor,element,qualifier);
    if (parent instanceof CSharpUsingNamespaceStatement) {
      PsiElement parentOfStatement=parent.getParent();
      if (parentOfStatement instanceof CSharpNamespaceDeclaration) {
        DotNetReferenceExpression namespaceReference=((CSharpNamespaceDeclaration)parentOfStatement).getNamespaceReference();
        if (namespaceReference != null) {
          PsiElement resolvedElement=namespaceReference.resolve();
          if (resolvedElement instanceof DotNetNamespaceAsElement) {
            processNamespaceChildren(processor,element,(DotNetNamespaceAsElement)resolvedElement);
          }
        }
      }
    }
  }
}