Aaron Lucky admitted to stealing $120 worth of body wash from a Philadelphia drugstore in 2014, served a few months in jail, and was released to serve out a sentence of community supervision: nearly five years of parole and probation.

Over the next year or so, Lucky, 55, thought he had managed to get his life on track, landing a full-time job at a retail-supply company and taking care of his aging mother. But he also missed some probation appointments, and failed a drug test. For that, Philadelphia Common Pleas Court Judge Anne Marie Coyle imposed the maximum punishment allowed under Pennsylvania law for a retail theft: 3½ to 7 years in state prison.

Now, the state Superior Court has vacated that sentence, in a ruling that raised questions about what motivated Coyle, who has publicly clashed with the office of District Attorney Larry Krasner over its handling of probation-violation cases.

In one controversial case, now before the state Supreme Court, Coyle settled a dispute by replacing the DA with a special prosecutor. In Lucky’s case, she expressed irritation about the DA’s stance that a six-month sentence was adequate, and said she was “more than a little annoyed” by what she viewed as Krasner’s efforts to “rewrite history to suit our social policies that we wish to promote.”

In a hearing in 2018, Coyle agreed to reduce Lucky’s sentence to 2½ to 5 years in prison — but, when he complained, she imposed the maximum punishment.

The Superior Court said the “potential for an appearance of bias, partiality, or ill will" by the judge was cause to vacate the conviction.

“There is nothing in the record to indicate that the judge’s reason for abruptly reimposing the increased statutory maximum sentence was for any reason other than her frustration with Appellant or her belief that Appellant was being disrespectful,” the Superior Court wrote in its decision. “This, coupled with the animus against the district attorney’s office that the judge revealed … lead us to conclude that a reasonable observer could question whether the judge comported herself in an unbiased and impartial manner.”

However, the Superior Court noted it does not have the authority to remove the case from Coyle’s courtroom — so it will be up to the judge to decide whether to impose a new sentence or to recuse.

Coyle’s lawyer, Jennifer Tobin, declined to comment. A person who answered the phone in Coyle’s chambers said she does not speak to the press.

Though Coyle has a relatively small probation caseload, she sentences violators to state prison at a higher rate than any other judge in Philadelphia, an Inquirer analysis found. About half of those she resentenced from 2013 to 2018 received state prison terms of two years or longer.

As a yearlong Inquirer investigation documented, Lucky’s sentence would not have been legal in many other states; Pennsylvania is one of a minority that places virtually no bounds on judicial discretion over probation terms.

Under criminal-justice reform efforts, at least 16 states have enacted legislation capping incarceration for probation violations like missed appointments or positive drug tests that are not new crimes, according to a Pew analysis. A bill in the Pennsylvania Senate would set caps here as well; however, the legislation has been stalled, and a companion probation-reform bill in the state House was gutted in committee.