Flying home to New Jersey from Chicago after the first two days at his new job, Sergey Aleynikov was prepared for the usual inconveniences: a bumpy ride, a late arrival. He was not expecting Special Agent Michael G. McSwain of the F.B.I. At 9:20 p.m. on July 3, Mr. McSwain arrested Mr. Aleynikov, 39, at Newark Liberty Airport, accusing him of stealing software code from Goldman Sachs, his old employer. At a bail hearing three days later, a federal prosecutor asked that Mr. Aleynikov be held without bond because the code could be used to “unfairly manipulate” stock prices.