For months, reporters at The New York Times tried to get inside the black box of breath testing. We interviewed more than 100 lawyers, scientists, executives and police officers and reviewed tens of thousands of pages of court records to find out how reliable these machines, a bedrock of the criminal justice system, really are.

These devices wield incredible power within the justice system: The numbers they print out are treated as all but indisputable by juries, and defendants usually don’t try to fight them.

But when they do, they sometimes win — and those victories have far-reaching consequences. In the past year, more than 30,000 test results were thrown out by judges in Massachusetts and New Jersey. Other challenges are moving through the courts in states across the country.