Judge Howard Sturim has gotten good at keeping his secret.

In 19 out of 20 jury trials, none of the people stepping into his courtroom at Nassau County Court figured it out. But in a 20th trial, it all unraveled with a sneeze — a sneeze that led to a jingle that led to an awkward, confusing pause in the proceedings.

“I didn’t want everyone to think they were going crazy, so I told them,” Sturim, 59, said. “This is Barney.”

Barney is a 2-year-old Irish doodle and Sturim’s diabetic-alert dog. For most of his day, he quietly naps under the bench. But he’s also trained to help Sturim manage his blood sugar, alerting the judge when he should check his levels and take insulin.

Sturim purchased Barney about a year ago, after his doctor suggested he look into alert dogs. For some diabetes patients, regular monitoring can be stressful or difficult, and trained dogs are increasingly being used as another tool to help manage the disease.

“Before him, I would just take oral medication and insulin. Because I have him, I can be more aggressive,” Sturim said. “My numbers have never been better.”

Sturim was diagnosed with type 2 diabetes more than 20 years ago. His body has lost its ability to produce and manage levels of insulin, a hormone that regulates blood sugar. Blood sugar levels that are too high cause nausea, vomiting and extreme thirst. But the bigger risk is when blood sugar levels dip too low, which causes confusion and loss of energy that can quickly deteriorate into a coma.

Sign up for The Classroom newsletter. Education on Long Island is changing. Find out how. By clicking Sign up, you agree to our privacy policy.

Type 2 diabetes can be managed with diet changes, weight loss and medication, but not every patient sees their symptoms improve. Sturim said his diabetes progressed despite treatment, and he now requires insulin shots.

Still, he said, his levels weren’t spectacular. And that’s where Barney comes in.

Trainers say diabetic-alert dogs use their strong sense of smell to detect subtle changes in body odor and alert their owner to check their levels. Sturim selected Barney from a group of puppies at Diabetic Alert Dogs of America, a Las Vegas-based company, and he underwent 10 months of scent training.

Barney paws at Sturim whenever he detects something wrong, sometimes before Sturim begins to feel symptoms. He’s even woken Sturim at night, saving him from a low blood sugar episode.

“As time goes by, you become more and more blind to when a low blood sugar is coming and that’s the value in Barney,” Sturim said. “He tells me where my blood sugar is going and that’s a very valuable tool.”

Seeing a friendly face with a wagging tail and mop of sandy hair in the office doesn’t hurt, either.

The science supporting alert dogs is limited, said Matt Petersen, vice president of medical information and professional engagement at the American Diabetes Association.

One 2017 study published in the Journal of Diabetes Science and Technology found that dogs were less accurate than a blood glucose meter. Petersen said scientists still are unsure what exactly diabetic-alert dogs are responding to. In 2017, the state of Virginia filed a suit against a diabetic-alert-dog company there, accusing the owners of duping consumers into buying expensive pets.

“It’s not a substitute,” Petersen said. “Our concern is people coming to rely on the dog instead of the glucose meter.”

Representatives at Diabetic Alert Dogs of America did not respond to requests for comment. In a Newsday story in May about a diabetic alert dog for a Farmingdale girl with type 1 diabetes, a trainer at the National Institute of Diabetic Alert Dogs in California said that the animals can provide warnings 15 to 30 minutes before problems show up in the blood.

“They have 220 million scent receptors and can sense when something is off very quickly by smelling a person’s body secretions, including saliva, sweat and breath,” said Breanne Peeples.

The dogs aren’t covered by insurance and can range in price from several thousand dollars to $25,000. It’s not clear how many people are using the dogs, though Petersen said the American Diabetes Association began hearing of them only in the past few years. Diabetic Alert Dogs of America delivers about 12 fully trained dogs each month and has trained more than 600 dogs in the past decade, according .

A spokesman for New York Unified Courts said they are not aware of other employees using similar dogs.

Still, Petersen said, there is one benefit to the dogs that isn’t in dispute: Patients who had one were much happier and more confident in their ability to manage their diabetes.

“Patient satisfaction is a real thing; we’re not robots,” he said. “People who are afraid of going low, they allow their blood glucose to be too high and that can lead to long-term complications. People who are afraid have worse outcomes.”

For Sturim, Barney has become a joyful part of his life. He quietly accompanies the judge everywhere, like a curly shadow.

When it’s time for court, Barney will select one of his favorite toys and curl up at Sturim’s feet under the bench.

Usually at the end of a trial, Sturim brings Barney in to say hello to the jury, sharing his secret in a grand reveal (with a few treats and pets for good measure).

“It’s an investment in my health,” he said.