Judge allows the National Science Foundation to withhold hundreds of millions of research dollars