The Senate yesterday voted to increase the number of offenses for which pretrial release on bail may be denied by federal judges if a defendant is shown to be a danger to the community.

An amendment offered by Sen. Bob Dole (R-Kan.) and passed by a voice vote provides for so-called preventative detention in cases of murder, rape, armed kidnaping, armed robbery and hostage-taking. Currently, pretiral release can be denied only in the case of aircraft hijackings resulting in death.

However, an amendment by Sen. William L. Scott (R-Va.) to establish criteria for imposing the death penalty for certain crimes was tabled by a 65-to-24 vote.

Scott's amendment was a copy of a death penalty bill submitted last April by the late Sen. John L. McClellan (D-Ark.), but which never made it out of a Senate Judiciary subcommittee.

Sen. Edward M. Kennedy (D-Mass.) attacked Scotts's proposal, saying it "runs completely contrary to the spirit, understanding and representations" with McClellan before he died.

Sen. Kaneaster Hodges Jr., who was appointed last month to succeed McClellan, also opposed the death penalty amendment, saying. "There is no doubt how he [McClellan] felt about the death penalty but he felt more strongly about the criminal code."

Pretrial detention without bail was tacked onto the proposed new federal criminal code, an overhaul of U.S. criminal laws which have been adopted over the last 200 years.

The bill, which Senate Majority Leader Robert C. Byrd (D.W. Va.) said he expects to be put to a vote late today, does not affect state criminal laws, or the District of Columbia, which have their own criminal codes. However, state legislatures traditionally follow the lead of federal statutes in drafting their criminal law.

Dole and Kennedy, cosponsors of the new federal code, argued intensively over the pretrial release issue during the fifth day of debate on the bill, which is the successor to the controversial S-1 criminal code bill.

Kennedy repeatedly challenged Dole to offer examples in which armed kidnapers and murderers have been released on bail, to which Dole replied, "I'll have a lot of examples if this bill passes. Why should we wait for statistics.

"We've talked a lot about crime in the streets, but the American public needs this much protection," Dole said.

Senate liberals and conservatives joined to pass the amendment after a move to table it was defeated 62 to 29.

The no-ball provision is similar to that contained in the controversial District of Columbia preventive detention clause, adopted as part of the Nixon administration's war on crime, and subsequently modified by the D.C. Bail Reform Act.