Goldman, Sachs & Co.’s practice of “title inflation,” conferring the rank of vice president to thousands of employees, cost it dearly in federal court in Newark on Tuesday.

U.S. District Judge Kevin McNulty held that a computer programmer charged with illegally taking source code was entitled to $1.7 million in legal fees and costs under bylaws providing for indemnification and defense of officers.

McNulty found “it may be the case that Goldman (or the industry of which it is a part) has been profligate in conferring the title of vice president. If so, Goldman must bear the consequences of that profligacy.”

The money at issue is for Sergey Aleynikov’s defense in a criminal case against him in New York state court.

But McNulty denied without prejudice his summary judgment motion for indemnification of fees and costs in a now-closed federal prosecution stemming from the same set of facts.

The judge said discovery is needed on Goldman, Sachs’ counterclaims of theft, misappropriation of trade secrets and conversion.

Aleynikov, who developed source code for Goldman, Sachs’ high-frequency trading business, resigned in June 2009 to take a job with Teza Technologies of Chicago, which sought to develop a similar trading platform. On his last day at Goldman, Sachs, he downloaded hundreds of thousands of lines of code relating to the trading platform, and later brought them to a meeting with Teza.

Aleynikov was convicted in 2010 of theft of trade secrets and transportation of stolen property in interstate and foreign commerce and sentenced to 97 months in prison.

The U.S. Court of Appeals for the Second Circuit overturned the conviction in June 2012, agreeing with Aleynikov that his actions did not meet the definitions of stealing goods or items placed into commerce under the statutes he was charged with violating.

In August 2012, the Manhattan District Attorney’s Office charged Aleynikov with unlawful use of secret scientific material and unlawful duplication of computer-related material over the same events. That case is pending.

In September 2012, he sued Goldman, Sachs, claiming he incurred $2.4 million in legal fees and expenses in the federal criminal case and paid $548,000 before his money ran out.

He claims his legal fees in the New York state case exceeded $700,000 and those in the federal case were $1 million.

Aleynikov contended that as a vice president, he was covered by the bylaws that provide advances and indemnification to officers.

McNulty agreed that he was a Goldman officer and entitled to the advance but not the indemnification because of the lingering discovery issues.

In a corporate context, the title of vice president would normally be considered an officer, but “officer” and “vice president” have no fixed definition in a noncorporate partnership like Goldman, Sachs, McNulty said. The definition of “officer” in the company’s bylaws is vague, and Aleynikov, as a programmer, did not perform “functions normally associated with the status of officer or manager,” he added.

Interpreting ambiguities under ordinary rules of construction, as specified under the law of Delaware, where the company is incorporated, plain language dictates that a vice president is an officer, McNulty said. And, Delaware’s contra proferentum rule on corporate bylaws dictates that in cases where an individual did not participate in drafting the corporate documents, ambiguities are interpreted against the drafter, McNulty said.

Goldman will have to pay for legal fees as the case progresses.

Aleynikov’s attorney in the federal, state and civil cases, Kevin Marino of Marino, Tortorella & Boyle in Chatham, says the finding that Aleynikov was an officer is an indication he is likely to prevail on the indemnification issue.

Goldman, Sachs’ lawyer, A. Ross Pearlman of Wolff & Samson in West Orange, did not return a call.