There are 56 F-35 Lightning II Joint Strike Fighters being assembled at Lockheed Martin’s facility in Fort Worth. But because only 20 percent of the testing for the most advanced fighter-bomber in U.S. history is completed, each will probably have to get million-dollar-or-more fixes later.

The F-35 is already the most costly U.S. weapons program underway at about $385 billion. But that figure may go higher with overrun of the per-plane contract price for the 56 craft being assembled — along with the future multimillion-dollar fixes likely to be required for them — and the 15 F-35s completed but not yet delivered to the military services.

The plane is being built with the most sophisticated stealth technology, but initial flight tests have turned up hot spots and cracks associated with metal and composites used on most new aircraft. The development of the software controlling the F-35’s major warfighting functions, the most complex ever planned for an airplane, has been delayed so that the last block will not be introduced to the aircraft until at least June 2015.

Earlier this month, Vice Adm. David J. Venlet, executive officer for the F-35 program, said in an interview with the online service AOL that he recommended slowing down current production lines to reduce the replacement costs that will be necessary in aircraft produced before testing is completed.

Production had already been slowed twice. Then-Defense Secretary Robert M. Gates pushed back the building of 122 aircraft in February 2010 as problems became apparent, and again in January as he lowered near-term production for another 124 planes, boosting future production needs.

Lockheed Martin says the F-35 flight was a success, even though what was to have been an hour-long flight only lasted 35 minutes. Although it did not pose a danger, the procedure called for ending the flight at that time, preventing completion of the remaining few tests, including raising the landing gear. (Tom Harvey/ASSOCIATED PRESS)

Sen. John McCain (R-Ariz.) took the Senate floor on Dec. 15 and described the F-35 fighter program as “a mess.”

What upset the senator was not just that the cost of each plane had risen nearly 100 percent from its original estimate of $69 million to $133 million today, or the fact that testing was only 20 percent complete while more than 90 planes had already been bought, or the fact that software — key to 80 percent of the stealth plane’s warfighting capability — wouldn’t be ready for another four years.

It was, he said, that the Pentagon had “sold this program as a fifth-generation strike fighter that would — more so than any other major defense procurement program — be cost-effectively developed, procured, operated and supported.”

McCain faulted the Pentagon for using what he called “a concurrent development strategy to procure a high-risk weapon system.” Production of the first airplanes began as testing was in its infancy.

McCain said the Pentagon was attempting “generational leaps in capability” but at the same time moving before the underlying design was stable. Developing needed technologies and being able to integrate them remain risky and manufacturing processes are still “immature,” he said.

A Government Accountability Office report from April said the forecast was for “about 10,000 more [engineering design] changes through January 2016.” The GAO added, “We expect this number to go up given new forecasts for additional testing and extension of system development until 2018.”

Making this initially a cost-plus contract was “a recipe for disaster,” according to McCain, who noted that development costs alone have topped $56 billion.

At a time when government discretionary budgets — including defense — face sharp reductions over the coming decade, the F-35 story is a troubling example of Pentagon spending.

By January, when the new Defense Department budget will go up to Capitol Hill, it is expected that the current cost estimate per F-35 will again increase, while production will be slowed to limit future fixes.

At the beginning of the program, there were to be 3,000 F-35s built, since it would replace the fighter-bombers in each of the three services and also be sold to foreign allies.

For the Air Force, the conventional takeoff and landing F-35A would replace the F-16 and the A-10 and add to the stealth F-22A. The Navy’s version, the F-35C, was to be carrier-suitable and complement the F-18E/F Super Hornet. The Marines wanted the F-35B, a short takeoff and vertical landing version, to replace the F/A-18C/D and AV-8B Harrier aircraft.

In March 2004, when development problems caused the Defense Department to extend time and increase projected costs, the Navy and Marine Corps cut their number of the planes by 400, reducing the total U.S. purchase to 2,457.

The Simpson-Bowles deficit-reduction commission in December called for eliminating the Marine Corps vertical-lift version, which has had serious development issues, and canceling 600 planes planned for the Air Force and Navy, using instead new F-18s or F-16s. The panel’s reasoning: The Pentagon “does not need an entire fleet with the stealthy capabilities” provided by the F-35.

In his new book, “The Wounded Giant,” Brookings Institution senior fellow Michael O’Hanlon calls for cutting the overall purchase to 1,250, canceling the more costly Navy version, reducing the Marine Corps F-35Bs by 10 percent or more, and limiting the Air Force to 800 F-35As. The difference would be made up by buying more F-16s and recognizing the role of unmanned aircraft.

There is a cautionary tale to be found in what happened to the F-22. When concept development of that stealth fighter began in 1986, the Soviet Union was the enemy and the Air Force needed 750 of the planes for the air-to-air superiority mission. By 1991, when the first development contract was signed, the Soviet Union had collapsed . By 2006, the Air Force cut its needs to 381 F-22s and added air-to-ground attack and intelligence-gathering capabilities.

In 2009, faced with several crashes and other problems, plus the oncoming F-35, Gates limited the purchase to 187 F-22s. Reasons given for ending the F-22 program were cost overruns and budget restraints.

Ironically, the last F-22 came off the Lockheed assembly line just two weeks ago and is to be delivered to the Air Force next year. Considered a more capable air-to-air combat fighter than the F-35, F-22s have been sent to the Pacific, where their intelligence-gathering is considered useful. Air Force testimony on Capitol Hill in May put the cost of the last F-22s at $153.2 million per aircraft and noted that upgrades were still being made to the plane’s software.

Changes in the 20 years between 1986 and 2006 caused a reduction of almost half the original F-22s sought. We should expect no less to happen between now and 2021. Prepare for that by limiting the F-35 purchases and looking into new technologies to plan what the future mix of manned and unmanned aircraft could be to meet the threats of 2031.