Abandoned, condemned or burned out, thousands of apartment buildings and houses in the District stand vacant. Some are boarded up, but few are boarded up completely. Many are wide open, their plywood coverings ripped away, their gaping windows and doorways telling of neglect and decay.

There are 2,580 of these urban blemishes, according to the D.C. Department of Planning and Development, and efforts to clean them up are handicapped by economic conditions and a lack of public funds. The vacant residences scar the city's neighborhoods and deplete the housing stock in an era when many residents find it difficult to locate moderately priced housing.

Worse yet, police say, the empty houses and apartments are invitations to crime and havens for criminals.

Many of the empty residential buildings are clustered in the Anacostia-Congress Heights areas of Southeast and the Shaw-Cardozo areas of Northwest. The dwellings have become junkyards and dumping grounds, rat havens, drug addicts' shooting galleries, alcoholics' saloons, spooky playgrounds for adventurous youths and targets for vandals and arsonists.

Police are searching for a roving arsonist who, they believe, has set fire to about 30 vacant buildings in Anacostia-Congress Heights since last November.

Often, burglars knock holes in the walls of vacant town houses to gain access to neighboring occupied homes. In the Capitol Hill area alone, particularly near the H Street NE corridor, about two dozen renovated homes attached to rotting, vacant houses have been burgled in just that way during the past six months.

Residents who live in those Capitol Hills homes had tried to foil burglars by installing iron bars and gates on doors and windows when they moved in. But the owners had not thought to protect their walls.

"I used to take walls for granted, but not anymore," says Jerrene Truett, laughing nervously. Last February, in the second-floor hallway of Truett's town house on Gales Street NE, a 2-by-4-foot hole was punched through the plastered drywall attaching it to the house next door.

The neighboring house has been vacant and unboarded since the elderly woman who owned it died two years ago. Although the hole in the wall was small, it was large enough for a burglar to squeeze through and enter Truett's home, getting away with a TV set and some jewelry.

"To think that someone would just come through the wall is just ridiculous," says Truett, a food program specialist for the Department of Agriculture. "I feel totally violated; this kind of invasion of property just freaks you out. The house next door was vacant when I moved in, but I didn't think twice about it. I didn't think anyone would use it to get into my house. And I didn't know the walls were so weak."

Detectives at the 5th District police station report that there have been nearly 200 similar rooftop and wall break-ins around Capitol Hill since January 1980. In many of these cases, police say, a burglar entered a vacant, partically boarded-up house through a doorway or a rooftop skylight and once inside, banged a hole through the wall of a neighboring house with a sledgehammer or other tool. The burglaries all took place in the daytime when homeowners were away. Any noise was probably thought by neighbors to be construction work, which is commonplace in the area, police say.

One Capitol Hill resident, whose 15th Street NE town house was invaded by way of a hole in a living room wall, says, "The vacant housing in the area is causing a serious burglary problem. It's costing us money and it's driving people crazy with paranoia." The man, who asked not to be identified, has lived in the area for three years.

He and other burglary victims have pressed City Council member Nadine P. Winter (D-Ward 6), a longtime housing activist, to do something about vacant housing in their area. One of their complaints is that speculators are sitting on unkempt houses, hoping to make large profits when they sell them for renovation.

In response, Winter has drafted legislation that would make it illegal for residential property owners to allow their buildings to remain unrenovated and unoccupied past a certain time limit -- not yet decided. The legislation would also require owners of vacant and boarded-up residential buildings to put iron bars and gates on windows and doorways and install smoke detectors.

Even where empty residences have been boarded up, many of the plywood boards have disappeared. According to the D.C. Department of Housing and Community Development, which owns about 5 percent of the city's vacant housing, mostly apartments, the boards are stripped away by criminals seeking to resell the wood or by do-it-yourself carpenters trying to beat the high price of plywood.

Winter says that it is all too easy to remove the plywood boards, which range from one-quarter to three-quarters of an inch thick. But DHCD and private owners say they cannot afford to use thicker plywood or iron bars and gates.

"It costs the city an average of $35 to board up each opening on a building," says Thomas Butler, chief of the DHCD housing regulation division. "Plywood is very expensive and if people need it, they take it off vacant buildings." Some buildings must be boarded up repeatedly; copper pipes often are stolen from vacant buildings as well, he says.

Last year, DHCD spent about $750,000 boarding up vacant apartments and houses. If the owner of an open building cannot be found after four weeks, the city boards it up. The city has the power to issue arrest warrants for negligent property owners, but if the owners live outside the District, they may never be found.

About 7,100 separate living units are contained in the District's 2,580 vacant apartment buildings and houses. They are owned by banks, private foundations, individuals and organizations as well as the federal and city governments.

City officials and private property owners offer a number of reasons for the large amount of vacant housing in the District. A DHCD spokesman says buildings become vacant as a result of condemnation for health or structural reasons, purchase by speculators who may or may not renovate them, or closure by landlords who say they are unable to raise rents because of the city's rent control laws.

Fred Davis, a real estate broker who bought a vacant Capitol Hill town house in 1976, says his house is still boarded up and unrenovated because he waited four years for a low-interest D.C. loan, only to be told recently that he did not qualify. Last October, someone broke through the wall of Davis' house and burgled a house next door.

The abundance of vacant housing and the shortage of moderately priced rental housing have long been hot political issues in the District. Mayor Marion Barry campaigned in 1978 to "take the boards down" from hundreds of vacant apartment units and single-family homes. Under his administration, the DHCD has purchased and rehabilitated about 3,000 apartment units and two dozen houses and found low- and moderate-income families to occupy them. Within a year, the DHCD says, it plans to renovate another 500 units, chiefly apartments. A spokesman said the department would like to purchase more units but does not have the funds.

Meanwhile, the city has used rent control laws to fight rising rents and maintain affordable housing.The rent control laws are unpopular with District landlords.

"There's a very serious problem with vacant housing in this city and it's the government's fault," says John O'Neill, executive vice president of the Apartment and Office Building Association, a landlord's trade association.

"The city's rent control laws make it unprofitable to rehabilitate rundown buildings and put them back on the market. You have a lot of landlords out there holding onto their properties simply because they are not certain what rents they could charge once they brought them back. It's a big gamble -- worse than going to (Las) Vegas. It costs thousands of dollars to renovate, but you can't charge the amount of rent necessary to make a decent profit. It's stupid."

O'Neill adds: "The DHCD ought to spend money renovating those hundreds of public housing units it owns and putting poor people in them. It seems more interested in buying every property it can find than in fixing up what they already own."

Robert Moore, DHCD director, replied: "Mr. O'Neill is misinformed on the issue. First of all, we'll be spending $40 million on renovation of public housing in D.C. over the next two years. Second, rent control is only one factor in the city's housing shortage. We need the federal government to give private landlords greater tax shelters and tax incentives so they would be more willing to invest in rental housing. Right now, it's more profitable for them to build property to sell than to rent. This is a nationwide problem. Local governments build 90 percent of all rental properties."

However, DHCD and private landlords are working together in lobbying Congress for tax breaks that would serve as incentives for apartment builders.