Program: 160693
Project: 160693
Buggy source:
private void performSearch(final SearchScope searchScope){
  JavaPsiFacade javaPsiFacade=JavaPsiFacade.getInstance(myProject);
  PsiClass subscribePsiClass=javaPsiFacade.findClass(SUBSCRIBE_CLASS_NAME,GlobalSearchScope.allScope(myProject));
  if (subscribePsiClass == null) {
    System.err.println("String_Node_Str");
    return;
  }
  FindUsagesHandler handler=findUsagesManager.getNewFindUsagesHandler(subscribePsiClass,false);
  if (handler != null) {
    UsageInfoToUsageConverter.TargetElementsDescriptor descriptor=new UsageInfoToUsageConverter.TargetElementsDescriptor(handler.getPrimaryElements(),handler.getSecondaryElements());
    final long startTime=System.currentTimeMillis();
    Processor<Usage> processor=new Processor<Usage>(){
      @Override public boolean process(      Usage usage){
        if (usage instanceof UsageInfo2UsageAdapter) {
          PsiElement element=((UsageInfo2UsageAdapter)usage).getElement();
          if ((element=element.getContext()) instanceof PsiAnnotation) {
            if ((element=element.getContext()) instanceof PsiModifierList) {
              if ((element=element.getContext()) instanceof PsiMethod) {
                if (PsiConsultantImpl.findAnnotationOnMethod((PsiMethod)element,SUBSCRIBE_CLASS_NAME) != null) {
                  maybeAddSubscriberMethod((PsiMethod)element);
                }
              }
            }
          }
        }
        return true;
      }
    }
;
    JavaClassFindUsagesOptions options=new JavaClassFindUsagesOptions(myProject);
    options.searchScope=searchScope;
    FindUsagesManager.startProcessUsages(handler,descriptor,processor,options,new Runnable(){
      @Override public void run(){
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug(String.format("String_Node_Str",searchScope,System.currentTimeMillis() - startTime));
        }
      }
    }
);
  }
}

Fixed version (ground truth):
private void performSearch(final SearchScope searchScope){
  JavaPsiFacade javaPsiFacade=JavaPsiFacade.getInstance(myProject);
  PsiClass subscribePsiClass=javaPsiFacade.findClass(SUBSCRIBE_CLASS_NAME,GlobalSearchScope.allScope(myProject));
  if (subscribePsiClass == null) {
    System.err.println("String_Node_Str");
    return;
  }
  FindUsagesHandler handler=findUsagesManager.getNewFindUsagesHandler(subscribePsiClass,false);
  if (handler != null) {
    UsageInfoToUsageConverter.TargetElementsDescriptor descriptor=new UsageInfoToUsageConverter.TargetElementsDescriptor(handler.getPrimaryElements(),handler.getSecondaryElements());
    final long startTime=System.currentTimeMillis();
    Processor<Usage> processor=new Processor<Usage>(){
      @Override public boolean process(      Usage usage){
        if (usage instanceof UsageInfo2UsageAdapter) {
          PsiElement element=((UsageInfo2UsageAdapter)usage).getElement();
          if ((element=element.getContext()) instanceof PsiAnnotation) {
            if ((element=element.getContext()) instanceof PsiModifierList) {
              if ((element=element.getContext()) instanceof PsiMethod) {
                if (PsiConsultantImpl.findAnnotationOnMethod((PsiMethod)element,SUBSCRIBE_CLASS_NAME) != null) {
                  maybeAddSubscriberMethod((PsiMethod)element);
                }
              }
            }
          }
        }
        return true;
      }
    }
;
    JavaClassFindUsagesOptions options=new JavaClassFindUsagesOptions(myProject);
    options.searchScope=searchScope;
    FindUsagesManager.startProcessUsages(handler,descriptor,processor,options,new Runnable(){
      @Override public void run(){
        optimizeEventClassIndex();
        scheduleRefreshOfEventFiles();
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug(String.format("String_Node_Str",searchScope,System.currentTimeMillis() - startTime));
        }
      }
    }
);
  }
}