Are there enough Americans smart enough to fill those roles?
Lol, yes, there are millions.
The company in question might need to retrain a C++ programmer to use JAVA and that sort of thing, but the syntax and peculiarities of any specific language or tool is nothing compared to the experience and knowledge of the overall engineering process of developing software.
The Myth of the Science and Engineering Shortage
Anyone that thinks that they can hire a high school 'code monkey' to pound out code and use that over the course of years deserves the shit that they get.
And yet the unemployment rate for experienced software engineers over the age of 50 is easily twice that of other age categories because morons in HR dont understand what is involved in software engineering and they think it is more important to check off that Word Perfect requirement than take a person with 20 years of Experience with no training in Word Perfect.
HR departments are probably half the problem of getting hired that older software engineers in America face, and the other half are the lyhing flesh mongers that bring in numbskulls from India and match their dudes resume to match the job openings, then give the poor guy cram courses on the software in transit from Hyderabad.
I once met an Oracle DBA with a doctorate, supposedly, from Hyderabad India who did not know how to do an SQL query on the command line to see what accounts had locks on a specific set of records. If he couldnt do it through TOAD he was helpless. The guy had a bullshit resume and his buddies from India helped him as much as they could, but anyone that pointed out the dudes shortcomings got the slander mill treatment till they got drubbed from the job. They then started winnowing people off the maintenance side of the project just somehow leaving only Hyderabad Brahamin caste engineers on the project.
These H1-B frauds are cramming out American engineers at every opportunity.
The H1-B, L2 and similar guest worker programs need to be completely shut down and scrapped until AMERICAN engineers reach full employment.