Automatic completion of program text using machine learning