Cargando…
PERSONA: A personalized model for code recommendation
Code recommendation is an important feature of modern software development tools to improve the productivity of programmers. The current advanced techniques in code recommendation mostly focus on the crowd-based approach. The basic idea is to collect a large pool of available source code, extract th...
Autores principales: | , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
Public Library of Science
2021
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8594850/ https://www.ncbi.nlm.nih.gov/pubmed/34784381 http://dx.doi.org/10.1371/journal.pone.0259834 |
_version_ | 1784600071327711232 |
---|---|
author | Nguyen, Tam The Nguyen, Tung Thanh |
author_facet | Nguyen, Tam The Nguyen, Tung Thanh |
author_sort | Nguyen, Tam The |
collection | PubMed |
description | Code recommendation is an important feature of modern software development tools to improve the productivity of programmers. The current advanced techniques in code recommendation mostly focus on the crowd-based approach. The basic idea is to collect a large pool of available source code, extract the common code patterns, and utilize the patterns for recommendations. However, programmers are different in multiple aspects including coding preferences, styles, levels of experience, and knowledge about libraries and frameworks. These differences lead to various usages of code elements. When the code of multiple programmers is combined and mined, such differences are disappeared, which could limit the accuracy of the code recommendation tool for a specific programmer. In the paper, we develop a code recommendation technique that focuses on the personal coding patterns of programmers. We propose Persona, a personalized code recommendation model. It learns personalized code patterns for each programmer based on their coding history, while also combines with project-specific and common code patterns. Persona supports recommending code elements including variable names, class names, methods, and parameters. The empirical evaluation suggests that our recommendation tool based on Persona is highly effective. It recommends the next identifier with top-1 accuracy of 60-65% and outperforms the baseline approaches. |
format | Online Article Text |
id | pubmed-8594850 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2021 |
publisher | Public Library of Science |
record_format | MEDLINE/PubMed |
spelling | pubmed-85948502021-11-17 PERSONA: A personalized model for code recommendation Nguyen, Tam The Nguyen, Tung Thanh PLoS One Research Article Code recommendation is an important feature of modern software development tools to improve the productivity of programmers. The current advanced techniques in code recommendation mostly focus on the crowd-based approach. The basic idea is to collect a large pool of available source code, extract the common code patterns, and utilize the patterns for recommendations. However, programmers are different in multiple aspects including coding preferences, styles, levels of experience, and knowledge about libraries and frameworks. These differences lead to various usages of code elements. When the code of multiple programmers is combined and mined, such differences are disappeared, which could limit the accuracy of the code recommendation tool for a specific programmer. In the paper, we develop a code recommendation technique that focuses on the personal coding patterns of programmers. We propose Persona, a personalized code recommendation model. It learns personalized code patterns for each programmer based on their coding history, while also combines with project-specific and common code patterns. Persona supports recommending code elements including variable names, class names, methods, and parameters. The empirical evaluation suggests that our recommendation tool based on Persona is highly effective. It recommends the next identifier with top-1 accuracy of 60-65% and outperforms the baseline approaches. Public Library of Science 2021-11-16 /pmc/articles/PMC8594850/ /pubmed/34784381 http://dx.doi.org/10.1371/journal.pone.0259834 Text en © 2021 Nguyen, Nguyen https://creativecommons.org/licenses/by/4.0/This is an open access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/) , which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. |
spellingShingle | Research Article Nguyen, Tam The Nguyen, Tung Thanh PERSONA: A personalized model for code recommendation |
title | PERSONA: A personalized model for code recommendation |
title_full | PERSONA: A personalized model for code recommendation |
title_fullStr | PERSONA: A personalized model for code recommendation |
title_full_unstemmed | PERSONA: A personalized model for code recommendation |
title_short | PERSONA: A personalized model for code recommendation |
title_sort | persona: a personalized model for code recommendation |
topic | Research Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8594850/ https://www.ncbi.nlm.nih.gov/pubmed/34784381 http://dx.doi.org/10.1371/journal.pone.0259834 |
work_keys_str_mv | AT nguyentamthe personaapersonalizedmodelforcoderecommendation AT nguyentungthanh personaapersonalizedmodelforcoderecommendation |