Most have settled on something called the Brunner test, named after a case that laid out a three-pronged standard for judges to use when determining whether they should discharge someone’s student loan debt. It calls on judges to examine whether debtors have made a good-faith effort to repay their debt by trying to find a job, earning as much as they can and minimizing expenses. Then comes an examination of a debtor’s budget, with an allowance for a “minimal” standard of living that generally does not allow for much beyond basics like food, shelter and health insurance, and some inexpensive recreation.

The third prong, which looks at a debtor’s future prospects during the loan repayment period, has proved to be especially squirm-inducing for bankruptcy judges because it puts them in the prediction business. This has only been complicated by the fact that many federal judicial circuits have established the “certainty of hopelessness” test that Mr. Wallace must pass in Ohio.

Lawyers sometimes joke about the impossibility of getting over this high bar, even as they stand in front of judges. “What I say to the judge is that as long as we’ve got a lottery, there is no certainty of hopelessness,” said William Brewer Jr., a bankruptcy attorney in Raleigh, N.C. “They smile, and then they rule against you.”

Debtors themselves struggle with testifying in their undue hardship cases. Carol Kenner, who spent 18 years working as a federal bankruptcy judge in Massachusetts before becoming a lawyer for the National Consumer Law Center, said that one particular case stuck in her mind.

The debtor had a history of hospitalization for mental illness but testified that she did not suffer from depression at all. “She was so mortified about the desperation of her situation that she was committing perjury on the stand,” Ms. Kenner said. “It just blew me away. That’s the craziness that this system brings us to.”

Debtors also stretch the truth in other directions. In 2008, a federal bankruptcy judge in the Northern District of Georgia expressed barely disguised disgust in deciding a case involving a 32-year-old, Mercedes-driving federal public defender with degrees from Yale and Georgetown. With nearly $114,000 in total household income, the woman’s financial situation was far from hopeless, despite her $172,000 in student loan debt.