NEW YORK - Joseph White had been arrested for having Xanax without a prescription, but since being sentenced to treatment, his drug tests have been clean.

"How do you like the program?" Judge Alex Calabrese asked White, who was at the Red Hook Community Justice Center in Brooklyn last week for a status hearing. "You've been in treatment before?"

White, 48, told him he hadn't. Calabrese scanned the man's record, shook his head, then looked up.

Forty prior arrests.

"No one has ever said to you, you could do a drug program?" he asked.

The judge was stunned, because in his courtroom, drug treatment, mental health counseling, and GED classes - not cash bail and jail time - are the defaults.

In an upstairs office at the Red Hook center, social workers and defendants talk about underlying problems leading to criminal behavior. Downstairs in the courtroom, Calabrese packs the solutions, like drug treatment and job training - and mandatory community service - into his sentences.

The goal is to treat neighborhood problems by treating the root causes of crime, making people less likely to offend again and reducing the number of inmates funneled through New York City jails.

The model has drawn wide attention, most recently from Philadelphia. Nearly 30 people - including staff from the District Attorney's Office, the Public Defender's Association, the First Judicial District Court, and City Council - visited Calabrese's court last week to learn about the program, which many said they would like to see replicated in the city.

Philadelphia is familiar with the model. The city had a community court until 2011, when it was closed due to budget constraints.

The trip was organized by City Councilman Curtis Jones Jr., who this summer opposed a plan to buy land near the city's prison complex in the Northeast to build a replacement for the aging and overcrowded House of Correction.

Jones said a community court should be one option Council explores with the goal of reducing the inmate population so a new facility isn't needed.

"If we're going to invest in brick and mortar, there needs to be investment on the other end," he said. "I don't want us to just say . . . let's build another building to house people."

Founded in 2000 in a renovated Catholic school in Brooklyn, the court serves a small but dense area and hears mostly misdemeanor "quality of life" crimes such as vandalism, drug possession, and trespassing. The court is like others in New York, except that a majority of sentences combine community service - including beautification projects that have helped transform the once-blighted area - with social services. Furthermore, everything from GED classes to trauma counseling is offered on-site.

Calabrese, who has been at the helm since the court opened, said that without addressing the reasons why a person offends, the system "is designed to give us repeat business."

"We have kids jumping the turnstile at 11 o'clock in the morning on a Monday, and you say, 'How come you're not in school?' You find out they dropped out of school," he said. "It doesn't really sound all that punitive, making them get a GED. But it's a great result for the community. . . . And it's a great result for the court system. We're not going to see them."

A 2013 study by the National Center for State Courts found Red Hook has had dramatic results.

Both felony and misdemeanor arrests have decreased, a phenomenon not found in adjacent communities. Only 1 percent of Red Hook defendants get jail time at arraignment, as opposed to 15 percent elsewhere in the city. Adult defendants are 10 percent less likely to commit another crime. The program saves, in reduced recidivism costs, more than what it costs at a ratio of 2-1.

With about $1.3 million funding for core programs, the court handles about 3,000 misdemeanor criminal cases, 11,000 summonses, 500 housing-court cases, and 175 juvenile cases each year.

Community courts have been around since 1993, when the first opened in Manhattan, and have recently gained traction. Now there are about four dozen in the country.

Philadelphia used to be among the group. The city's Community Court opened in 2002 with the help of a grant from the Pew Charitable Trusts. The court was first envisioned by Paul Levy, president of the Center City District, as part of an effort to revitalize downtown.

Unlike Red Hook, Philadelphia's community court drew misdemeanor cases from a large swath of the city, including Center City, South Philadelphia, and parts of West and North Philadelphia. Like at Red Hook, defendants had access to a host of social services.

In 2009, while testifying before Council for funding, Levy said that the court had heard more than 55,400 cases in about six years and defendants had completed more than 407,000 community service hours.

In an interview last week, Levy said the court was especially helpful for a crime like aggressive panhandling, which can go unaddressed, and involve underlying mental health or drug concerns. He said a community court could be just as effective today and that he was hopeful last week's trip sparks a broader effort to be picked up by the next mayor's administration.

"We are significantly missing the tool," he said.

Since Philadelphia Community Court's closing, many misdemeanor cases that it had heard have been handled through a program that, among other things, allows charges to be dropped in exchange for community service. The program offers some social services, but not as robustly as the ones found at a community court.

Derek Riker, who heads the district attorney's diversion courts unit, said the city's current program works like a quasi-community court and could be the foundation for a more formal community court.

Riker, who was part of the city delegation that toured Red Hook, said the program has just two social service workers and would benefit greatly from regular access to mental health and other services.

Another official who toured Red Hook, Tom Innes, director of prison services at the Philadelphia Public Defender's Office, said a similar program here "would be terrific" - if the city can afford it. Social services, he said, are expensive.

Deputy Police Commissioner Kevin Bethel, who wasn't on last week's tour but is familiar with community courts from when Philadelphia had one, said he would love to see Red Hook replicated here. Funding shouldn't get in the way, he said.

"We're a big city," he said. "We have a lot of services. Often times it's redirecting those services in the right place."

Councilwoman Maria Quiñones Sánchez echoed those thoughts, saying she could open a community court in her district for relatively little money by tapping social service organizations already working there. After attending last week's tour, she has already reached out to some of those groups and plans to talk with the local police leadership soon.

She said she is fully committed to opening a community court in her district, specifically in the North Philadelphia neighborhood surrounding Somerset and Front Streets.

"We have a huge drug problem in that community," she said. "We're just not going to be able to arrest our way out. These people need treatment."

215-854-2730 @TriciaNadolny