ASTSDL: predicting the functionality of incomplete programming code via an AST-sequence-based deep learning model
Code recommendation systems have been widely used in helping developers implement unfamiliar programming tasks. Many existing code recommenders or code search engines can retrieve relevant code rapidly with high accuracy, however, they cannot recommend any code outside similar ones. We propose an ap...
Gespeichert in:
| Veröffentlicht in: | Science China. Information sciences Jg. 67; H. 1; S. 112105 |
|---|---|
| Hauptverfasser: | , , , , |
| Format: | Journal Article |
| Sprache: | Englisch |
| Veröffentlicht: |
Beijing
Science China Press
01.01.2024
Springer Nature B.V |
| Schlagworte: | |
| ISSN: | 1674-733X, 1869-1919 |
| Online-Zugang: | Volltext |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| Zusammenfassung: | Code recommendation systems have been widely used in helping developers implement unfamiliar programming tasks. Many existing code recommenders or code search engines can retrieve relevant code rapidly with high accuracy, however, they cannot recommend any code outside similar ones. We propose an approach to predict the functionality of incomplete programming code by using syntactical information, and providing a list of potential functionalities to guess what the developers want, in order to increase the diversity of recommendations. In this paper, we propose a deep learning model called ASTSDL, which uses a sequence-based representation of source code to predict functionality. We extract syntactical information from the abstract syntax tree (AST) of the source code, apply a deep learning model to capture the syntactic and sequential information, and predict the functionality of the source code fragments. The experimental results demonstrate that ASTSDL can effectively predict the functionality of incomplete code with an accuracy above 84% in the top-10 list, even if there is only half of the complete code. |
|---|---|
| Bibliographie: | ObjectType-Article-1 SourceType-Scholarly Journals-1 ObjectType-Feature-2 content type line 14 |
| ISSN: | 1674-733X 1869-1919 |
| DOI: | 10.1007/s11432-021-3665-1 |