Silicon Valley companies, warning of an acute labor shortage, say it is too costly to retrain older workers like Mr. Doernberg, and that the country is not producing enough younger Americans with the precise skills the industry needs. Their arguments have persuaded a majority of senators to give them what they want: a provision in the immigration bill to let in many more foreign professionals.

But Americans like Mr. Doernberg and the powerful labor lobby say that what the tech industry really wants is to depress wages and bring in more pliant, less costly temporary workers from overseas. If there is such a talent shortage, they ask, why are wages for most engineers not rising faster? Labor groups have pushed for a requirement to offer jobs to equally qualified Americans before hiring foreigners, a provision that the industry has fiercely resisted.

More From The New York Times:

Senate Passes Sweeping Immigration Overhaul

PublicRage Is Catching Up With Brazil's Congress

PortAuthority Explores Redoing Bus Hub

The pitched arguments of both sides, which are likely to resurface in the House when it takes up its version of an immigration overhaul, cloud a complicated reality. There is little empirical evidence to suggest that foreign engineers displace American engineers as a whole. If anything, one recent study suggests, the growth of immigrant workers in American companies helps younger American technical workers — more of them are hired and at higher-paying jobs — but has no noticeable consequences, good or bad, on older workers.

"In the short run, we don't find really any adverse or superpositive effect on the employment of Americans," said William R. Kerr, a Harvard business professor who conducted the study on the work force of 300 American companies. "People take an extremely one-sided view of this stuff and dismiss any evidence to the contrary."

A recent analysis by the Brookings Institution reached a similar conclusion. It found that in the top 10 cities that bring in the largest number of high-skilled guest workers on H-1B visas, college-educated Americans — those who could compete for jobs with high-skilled guest workers — are not more likely to be unemployed.

At the same time, though, the industry's claims of a labor shortage may be somewhat overblown. Most H-1B workers hold entry-level positions. Economists say that bringing in more of these workers would serve to keep wages down. It also saves employers the trouble of having to retrain workers.

There is a difference between what companies say they need and want, said Peter Cappelli, a management professor at the Wharton School at the University of Pennsylvania. "Saying we need people with these skills is like me saying I need a four-wheel drive," he said. "They could retrain people."

(Read More: What the CBO Report Really Says About Immigration)

It is true that for certain categories of engineers, wages are not going up as sharply as one would expect if good engineering talent were indeed hard to find. But it is also true that engineers with certain specialties, like software development, are hard to find.

Intel, for instance, which has more than 50,000 employees in the United States, said it has 1,000 openings. Motorola Solutions said it was scrambling for software engineers. And unemployment among technology professionals is generally about half the national average, buttressing the industry's claims.