Program: 93497
Project: 93497
Buggy source:
private IType resolveType(final ITypeName recType){
  ensureIsNotNull(recType);
  if (recType.isNestedType()) {
    final ITypeName declaringType=recType.getDeclaringType();
    final IType parent=resolveType(declaringType);
    if (parent != null) {
      try {
        for (        final IType nested : parent.getTypes()) {
          System.out.println(nested);
        }
        for (        final IMethod m : parent.getMethods()) {
          for (          final IJavaElement children : m.getChildren()) {
            if (children instanceof IType) {
              final IType nested=(IType)children;
              final String key=nested.getKey();
              if (key.equals(recType.getIdentifier() + "String_Node_Str")) {
                return nested;
              }
            }
          }
        }
      }
 catch (      final Exception x) {
        System.out.println(parent);
        return null;
      }
    }
    return null;
  }
  final IType[] res=new IType[1];
  final IJavaSearchScope scope=SearchEngine.createWorkspaceScope();
  final SearchEngine search=new SearchEngine();
  final String srcTypeName=Names.vm2srcTypeName(recType.getIdentifier());
  final SearchPattern pattern=SearchPattern.createPattern(srcTypeName,IJavaSearchConstants.TYPE,IJavaSearchConstants.DECLARATIONS,SearchPattern.R_EXACT_MATCH);
  try {
    search.search(pattern,SearchUtils.getDefaultSearchParticipants(),scope,new SearchRequestor(){
      @Override public void acceptSearchMatch(      final SearchMatch match) throws CoreException {
        res[0]=(IType)match.getElement();
      }
    }
,null);
  }
 catch (  final CoreException e) {
    throwUnhandledException(e);
  }
  return res[0];
}

Fixed version (ground truth):
private IType resolveType(final ITypeName recType){
  ensureIsNotNull(recType);
  if (recType.isNestedType()) {
    final ITypeName declaringType=recType.getDeclaringType();
    final IType parent=resolveType(declaringType);
    if (parent != null) {
      try {
        for (        final IType nested : parent.getTypes()) {
          final String key=nested.getKey();
          if (key.equals(recType.getIdentifier() + "String_Node_Str")) {
            return nested;
          }
        }
        for (        final IMethod m : parent.getMethods()) {
          for (          final IJavaElement children : m.getChildren()) {
            if (children instanceof IType) {
              final IType nested=(IType)children;
              final String key=nested.getKey();
              if (key.equals(recType.getIdentifier() + "String_Node_Str")) {
                return nested;
              }
            }
          }
        }
      }
 catch (      final Exception x) {
        System.out.println(parent);
        return null;
      }
    }
    return null;
  }
  final IType[] res=new IType[1];
  final IJavaSearchScope scope=SearchEngine.createWorkspaceScope();
  final SearchEngine search=new SearchEngine();
  final String srcTypeName=Names.vm2srcTypeName(recType.getIdentifier());
  final SearchPattern pattern=SearchPattern.createPattern(srcTypeName,IJavaSearchConstants.TYPE,IJavaSearchConstants.DECLARATIONS,SearchPattern.R_EXACT_MATCH);
  try {
    search.search(pattern,SearchUtils.getDefaultSearchParticipants(),scope,new SearchRequestor(){
      @Override public void acceptSearchMatch(      final SearchMatch match) throws CoreException {
        res[0]=(IType)match.getElement();
      }
    }
,null);
  }
 catch (  final CoreException e) {
    throwUnhandledException(e);
  }
  return res[0];
}