A federal court judge ruled yesterday that the principal of a Silver SPring high school did not violate students' right to free speech when he confiscated a student underground newspaper containing an advertisement for drug paraphernalia.

"A parent and no less the school system has the power and right under law to make reasonable and rational judgments about materials to which an immature high school student can be subjected," said Judge James R. Miller.

"Any judge who has sat on the bench for more than six months, if he's had his eyes open, requires no more testimony to the dangers of such materials than the facts of what he has seen before him and the presentence report," Miller added.

Miller's ruling in the free speech controversy was prompted by a slim bound volume called "Joint Effort" which was coedited by Gregory Williams and Mark Gutstein, both 16-year-old students at Springbrook High School.

By the time the students had sold 80 copies of the paper for 15 cents each at the school on Feb. 17, the principal, Dr. Thomas P. Marshall, decided to confiscate the remaining 350 copies because the paper contained a full-page advertisement for drug paraphernalia.

Michael D. Simpson, an attorney representing the youths along with Williams' father, Bernard Jay Williams, who himself had a small advertisement in the newspaper, said the school system could not suppress free speech without proving that the material actually posed a disruptive threat on the school.

Miller said the drug paraphernalia advertisement "makes it crystal clear to anyone but the most dense or the most naive that which is being advocated and offered for sale . . . and the use to which it is put."

Adults are mature enough to make decisions about what to read and to buy, he added, "but a child has not yet reached that point."

The two coeditors declined to express a reaction to the judge's ruling, saying that they "were too immature."