In one of the unusual twists of the tax-writing process, the two companies that probably did the most to create the controversy over corporate tax leasing -- General Electric Co. and Occidental Petroleum Corp. -- are among the least harmed by the reform of corporate tax leasing now before Congress.

The tax bill, which is widely viewed as a major tax "reform" closing many alleged loopholes in the law, was also the center of intense battles to protect the interests of specific companies. Firms as diverse as Boeing Co. and Marriott Corp. succeeded in winning special rules to protect them from toughened tax laws in the bill.

General Electric, which hired one of the city's most influential lobbyists -- J. D. Williams -- to protect its interests, came out of the long and bitter fight generally acknowledged a winner. Congressional aides contended that the firm is likely to gain a competitive edge in the long run as a result of the legislation.

A spokesman for GE said the firm views the tax bill now before Congress -- which would raise $98.3 billion over three years and which includes repeal of corporate tax sales through paper leases after Jan. 1, 1984 -- as an essential part of the drive to reduce deficits and lower interest rates. "Therefore, it is needed and will have General Electric's support," he said. The spokesman said he was unable to provide a company position on the leasing provision specifically.

Using a subsidiary, General Electric Credit Corp., GE bought so many tax credits and depreciation rights in 1981 that it effectively eliminated all federal tax liability and got a refund of about $100 million on past years' payments. For 1981, GE reported net earnings of $1.65 billion.

The effective elimination of 1981 tax liability increased public criticism of corporate tax sales and was a major factor in the drive to restrict the provision in the 1981 law allowing them.

According to most persons engaged in the leasing business, repeal of corporate tax sales after 1984 will not be a major blow to GE because GE Credit Corp. already had been active in the traditional leverage leasing business.

Under the reforms of corporate tax sales, the rules governing traditional leasing would be liberalized, effectively expanding potential markets for firms such as G.E. Instead, many sources believe that the publicity surrounding corporate tax sales is likely in the long run to increase market interest in traditional leasing as a means to reduce the cost of capital acquisitions, a step that could function to give GE more business.

In the case of Occidental, congressional and public concern developed over disclosures that the highly profitable oil company was able to sell tax breaks on $94.8 million worth of equipment for about $25 million because it owes no U.S. taxes.

Occidential paid no federal taxes in 1981 despite net earnings of $722 million because of a combination of foreign tax credits, domestic losses, and investment tax credits.

In an effort to clear up what members of Congress viewed as a "perception problem" -- a profitable oil company that pays no federal taxes making more than $20 million from the sale of unusable tax breaks -- the Senate approved a provision in the tax bill that would have prohibited firms from using tax sales if their federal tax liability had been elimimated because of foreign tax credits.

This so-called "Occidental provision" was eliminated from the bill during conference committee consideration, however. According to congressional aides, the provision was not elimated at the behest of Occidental, but under pressure from International Telephone & Telegraph Corp. and Ford Motor Co.

According to the aides, the two firms' tax situations are relatively similar to that of Occidental.

Marriott and other hotels were able to temporarily keep a tax benefit for corporations engaged in non-residential construction. Marriott, which has strong ties to the Republican Party, was able to get a special temporary exemption for hotels through a Senate amendment sponsored by Sen. Orrin Hatch (R-Utah).