A senior ex-judge has condemned delays in the prosecution of former spy Witness K and his lawyer, Bernard Collaery, saying they represent an “absolute abandonment” of the principles of open and fair justice.

Prosecutors initiated action against Witness K and Collaery in June for their roles in revealing a controversial, covert Australian spy operation to bug the Timor-Leste government during sensitive oil and gas negotiations in 2004.

The case has been mired in secrecy and delay. A preliminary hearing will take place in August to work out how the court can protect sensitive national security material while preserving the defendants’ right to a fair trial.

Bernard Collaery is being prosecuted for his role in revealing a covert Australian spy operation to bug the Timor-Leste government during oil and gas negotiations. Photograph: Mike Bowers/The Guardian

It means Witness K and Collaery will have been before the courts for more than 14 months by the time the preliminary hearing, which is closed to the public, concludes.

The protracted and opaque nature of the hearings has prompted anger in some legal circles. Anthony Whealy, a former judge of New South Wales’ highest court, said the delays were inexplicable.

“I just do not understand what is going on here,” Whealy told Guardian Australia. “The fact that the time taken has blown out by 12 months just to deal with preliminary matters strikes me as an absolute abandonment of the principles of open justice. It requires the attorney general to justify what’s going on, because it’s just so unfair to the participants.”

The commonwealth director of public prosecutions accepted the delays were regrettable. But the office rejected any notion of an “abandonment” of the principles of justice.

“This delay has been occasioned by legal argument arising from the application of important legislative provisions which seek to ensure that each accused receives a fair trial whilst also protecting Australia’s national security interests,” it said in a statement.

“The commonwealth DPP remains committed to ensuring these prosecutions proceed as expeditiously as possible.”

The attorney general, Christian Porter, has issued certificates restricting the way certain material in the brief of evidence against Collaery and Witness K can be disclosed. Those certificates, issued under the National Security Information Act, have prompted the August preliminary hearing.

Whealy sat on the NSW supreme court between 2000 and 2012, including two years on the NSW court of appeal, and has actively championed issues of transparency and government integrity since leaving the bench.

Whealy said he had presided over terrorism cases in which similar certificates had been issued. He said they were dealt with in a matter of weeks.

“If the material is so significant a danger to national security if disclosed, then the result should be that the proceedings are abandoned,” Whealy said.

The matter is before chief magistrate Lorraine Walker in the ACT magistrates court.