Computer technology is helping solve the massive jigsaw puzzle of restoring the crumbling, 1,200-year-old Borobudur Buddhist shrine, the largest of its type in the world.

Although Borobudur is not as spraoling or artistically pure as Cambodia's famed Angkor temple complex, Western art historians have become increasingly concerned about preserving this site since Cambodia sealed its doors to the outside world two years ago.

Through the use of the computer, archaeologists and technicians are dismantling, labeling, drying, cleansing, preserving and replacing more than a million stone blocks out of which the ornately carved wedding cake-like shrine is built.

According to experts here, the advanced technology will allow the $16 million project to be completed in six to eight years. Attempted without help from the computer, the job would take as estimated 70 years. A computer has also been used on Egypt's Abu Simbel restoration project, resulting from the construction of the Soviet-built Aswan Dam.

While the operation goes on here, Borobudur is not the tourist attraction Indonesia hopes it will one day be. The temple's sleeply rising 10 levels are cluttered with corrugated metal shelters and corrugated metal shelters and bright yellow construction equipment, including a pair of towering, track-mounted cranes that lift away pallets of dismantled stones.

Some workmen scramble over the monument's northern and eastern sides so that visitors are restricted to the two faces still awaiting restoration.

Below the artificial hill on which the temple was built around 800 A.D., open fields are littered with almost endless mounds of stones, some waiting for chemical baths and others in storage for as long as five years.

Near the stone blocks are ranks of life-size or larger seated Buddha images, many without their heads. According to the project's chief documentarian, Subyantoro, 100 of Borobudur's 570 Buddhas were decapitated over the centuries. "We've been able to locate only 50 heads on the site," he said.

Some other heads are known to be in European museums and a number of particularly fine examples were given to King Chulalongkorn of Siam (now Thailand) in 1896, during his state visit to Jave. The Indonesian government has asked Thailand and the other nations to return the antiquities so that restoration may be as nearly complete as possible.

In a large room lined with shelves full of heads, chief stone conservator Samidi told a visitor that the Buddhas were decapitated by earthquakes, by Moslems during their ancient wars to impose Islam on formerly Buddhist Java, and more recently by "unscrupulous people out to make a profit on the foreign antique market."

Perhaps the most exacting part of the many stone restoration projects that are going on simultaneously is the task of matching heads to torsos. Technicians using calipers measure the necks and the bases of the heads at eight different points. These measurements are then fed into the computer and the best possible matches are produced. A similar computer technique is used to find replacement slots for some 10,000 stones which tumbled from the structure over the years.

Two years of computer time and the services of systems engineer Vijay Kant Khandelwal have been donated by International Business Machines Corp. Khandelwal, an IBM employee from New Delhi, said the computer's job, and his own, will be finished this month. But the entire project, which began in 1975 and has been plotted out step-by-step with the aid of Khandelwal and the computer, is not expected to be completed until 1981 or, as Khandelwal conceded, "perhaps a little later."

When the Indonesian government and the U.N. Educational, Scientific and Cultural Organization (UNESCO) first agreed on the plans in 1969, the total cost was set at $7.5 million. The total has since more than doubled. Half the funds are provided by Indonesia and the other half from a group of 21 nations through UNESCO.

Critics of the project in Indonesia and abroad claim that costs could have been sharply reduced if proven and cheaper, though lengthier, techniques were employed. Those who defend the system being used at Borobudur insist it will prove cheaper in the long run.

One of the more time-consuming jobs is building a completely new drainage system through the artificial hill and stone work. Experts had founf that the major source of damage to the porous stone structure was water seepage.

Borobodur is a solid structure, without rooms, and filled with stone blocks and earth. The original drainage system didn't function well enough to allow the heavy monsoon downpours to run off through its fanciful gargoyle-headed stone pipes. As a result, several terraces began to shift and collapse. These are now being underlain with concrete floors, which will later be resurfaced with their original stones.

The entire stone conservation procedure is costly, complicated and tedious. Before the stones are dismantled, they're labeled, some with painted-on numbers and others by chisled code marks that are fed into the computer for future reference.

The stone blocks that comprise the superb bas relief panels, which trace the 10 steps of Buddha's teachings toward the goal of nirvana, are treated with chemical cleansers, then rinsed with water.After that, if necessary, a workman armed with nothing more than a steel sewing needle picks away at any stubborn moss and lichens still clinging to tiny crevices. Finally, the stones are electrically dried and treated with another chemical compound intended to ward off future assaults by funguses that flourish in the hot, damp Borobudur climate.

Some art conservationists have complained that the petrochemical treatment will shorten the life of the stones. Complaints like this have also been made about restoration projects in Europe. But, said Samidi, who was trained in France, "we tried several types of chemicals and chose the ones with the fewest side effects."

Another process that has been criticized is the stone drying, which is done in a $400,000 oven heated to 104 degrees Farenheit. Critics claim that the same results could be achieved through using cheap, hand-held hair dryers, as was done by French restorers at Cambodia's Angkor Wat.

But Samidi said that the extent of the project here, where virtually every stone will be removed and dried, negated the possibility of using the Angkor system. And disclaiming the possibility of cleansing bas relief panels by burying them face down in the ground rather than bathing them in chemicals, he said there simply was not enough space to do this.

Samidi said he had no doubt that Indonesia intended to maintain Borobudur for a long time, once the restoration is completed. His workers are also producing rubber molds and three-dimensionsl photogrammetry drawing.

"Besides," he added, "once we're finished, we'll have a permanent maintenance staff and that should enable us to fight off the effects of further decay for at least another 100 years."