Generating code autocompletions for Integrated Development Environments

Defense Date:

Code autocompletion is a feature that offers suggestions for what a software developer may want to write. Correct suggestions improve efficiency of programmers job. There are a lot of forms of code autocompletion, for example using dictionary methods or parsing code online. In this paper, I propose approach for code autocompletion using machine learning. It generates ranked by its probabilities of occurrences list of suggestions, which can be used by software developer at edit time. I describe explored architectures and compare them to each other in order to select the best one. I also discuss challenges regarding this approach. The final model was trained using 9000 Python source files from publicly available repositories from service GitHub and evaluated on 4500 files. The evaluation results in 68% accuracy for top 5 suggestions, and mean time of response resulted in 18 ms. The system is available as a plugin for integrated development environment SublimeText 3.