The University of California agricultural research program, which helped make the tough, machine-harvested tomato an American supermarket staple, has been found in violation of a century-old federal law that requires federally supported research to foster consumer welfare and preserve small family farms.

Judge Raymond Marsh of the Alameda County Superior Court, in findings released yesterday, held that the university violated the federal Hatch Act of 1887 by emphasizing projects that have cost thousands of farm jobs, favored corporate-style farms and led to heavy economic concentration in U.S. fruit and vegetable production.

The judge's order directs the university to develop within 90 days a detailed plan for complying with the Hatch Act. It came after eight years of complex proceedings that focused on UC's development of expensive harvest machinery typically used in large factory-style farming operations.

Marsh said he would review the university's revised research plan, change it if necessary and retain jurisdiction for at least five years.

University attorney Gary Morrison said the system will appeal "on the grounds that . . . there is nothing in the Hatch Act that requires such a process." He said the university "has procedures in place to insure that sound and quality research is conducted for the benefit of all mankind, including small family farmers."

The Hatch Act, reaffirmed by succeeding Congresses, provides federal money for agricultural experiment stations at land-grant universities. The UC system, largest in the nation with campuses at Davis, Riverside and Berkeley, received $4 million in Hatch Act money last year to support almost half of the university's 1,327 agricultural research projects.

The trial involved all of its Hatch Act projects but focused on the use of federal funds to develop labor-saving devices. The most graphic example was a harvester that displaced workers, pushed small farmers out of the tomato processing business and led to market domination by a handful of large growers.

If upheld, Marsh's findings would apply only in California. But their impact is expected to be felt throughout the land-grant university research network and among farm-worker advocacy groups.

Clare I. Harris, associate administrator of the Agriculture Department's Cooperative State Research Service, which oversees Hatch Act spending, said that USDA looked into the university's program after the suit was filed "and we have supported their contention that they did not violate the intent" of the act.

The suit was filed in 1979 by California Rural Legal Assistance on behalf of 15 farm workers and the California Agrarian Action Project of Davis, now the California Action Network. Marsh's findings were announced by CAN and farm-worker groups yesterday in Washington and San Francisco.

At a news conference here, Elizabeth Martin, former executive director of CAN, said that mechanization research was the "premier issue" in the suit but that the activists also were trying to force the UC system to study the implications of its research before proceeding in the laboratories.

"We were not saying the tomato harvester should not have been developed. We said that it just should not have been developed with Hatch Act money," Martin said. "Not a penny was spent to study the implications of mechanization on jobs, on farm size, on prices, on the environment."

According to data prepared for the trial, the UC-developed tomato harvester went into commercial production in 1963 and quickly transformed the industry in California. Harvest-time jobs fell from 50,000 in 1964 to fewer than 18,000 by 1970; the number of tomato growers fell from 4,000 in 1963 to 597 a decade later.

Only the largest, best-capitalized farmers could afford the machines, which cost more than $100,000 each. The average processing tomato plot climbed from 32 acres to 363 acres in 10 years. Consumer prices rose 111 percent, compared with a 74 percent increase for other fruits and vegetables.

Although mechanical harvesters have displaced thousands of other workers in crops such as grapes, tree fruits and tobacco, Martin said that she and others did not feel that Marsh's decision was "too late."