A former Goldman Sachs programmer—featured in the book Flash Boys—was convicted on Friday for stealing high-speed trading code from the bank.

Sergey Aleynikov, 45, was also acquitted on one count of unlawful duplication, according to Reuters. The New York state jury could not come to a verdict on another count of unlawful use of secret scientific material.

This was the second trial for Aleynikov in five years. He could face up to four years in prison.

Aleynikov left Goldman Sachs in 2009 for a high-speed trading startup and was arrested by the FBI after he was caught downloading a copy of the firm’s code to his home computer. He was convicted in federal court in 2010 on one count of stealing trade secrets and one count of transporting stolen property.

He served a short prison sentence before the United States Court of Appeals for the Second Circuit overturned the decision in 2012. The appeals court wrote that Aleynikov did not steal anything physical when copying the source code, because it was done over the Internet, and did not violate the National Stolen Property Act.

But then Aleynikov was arrested and charged again—this time in state court. Manhattan District Attorney Cyrus Vance called the source code that Aleynikov had copied Goldman Sach's "secret sauce."

In the latest trial, jurors were apparently confused by the definition of the charges, which led to the mixed verdicts, according to the New York Times.

Kevin Marino, Aleynikov’s lawyer, plans to file a motion to dismiss the conviction, Reuters reported.